๐Ÿ”—API

This guide will help you understand how to use the API to integrate and automate your interactions with Bodt.io.

Quick Overview

The Bodt.io API allows you to interact with our services programmatically. The base URL for the API is

https://api.bodt.io/v1

All API endpoints are prefixed with /v1, indicating the version of the API you are using. Ensure you include this version prefix in your requests.

Authentication

To ensure secure access to the API, all requests must be authenticated using a Bearer Token. This token can be found in the project settings section of your Bodt.io account.

How to Authenticate

  1. Retrieve your Bearer Token from the project settings section of your Bodt.io dashboard.

  2. Include the token in the Authorization header of all your API requests.

Here is an example of how to include the Bearer Token in your API request headers:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Example Request

curl -X GET "https://api.bodt.io/v1/your-endpoint" \
     -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
     -H "Content-Type: application/json"

Replace <YOUR_ACCESS_TOKEN> with the token you retrieved from your project settings.

Obtain API Credentials

You can obtain API credentials from the "Profile" section of your account.

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of a request. Here are some common status codes you might encounter:

  • 200 OK: The request was successful.

  • 400 Bad Request: There was an issue with the request, such as missing parameters or invalid data.

  • 401 Unauthorized: Authentication failed. Check your Bearer Token.

  • 403 Forbidden: You do not have permission to access the requested resource.

  • 404 Not Found: The requested resource does not exist.

  • 500 Internal Server Error: An error occurred on the server. Try again later.

Last updated