# 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

```http
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:

```http
Authorization: Bearer <YOUR_ACCESS_TOKEN>
```

#### Example Request

```bash
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.&#x20;

<figure><img src="/files/84DX28VF1bD4lIsUtFsT" alt=""><figcaption><p>API Keys for bodt.io</p></figcaption></figure>

### 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.

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bodt.io/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
