> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theomnibot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ChatbotX REST API — Overview and Authentication

> Authenticate with the ChatbotX API using Bearer tokens, review base URLs for cloud and self-hosted instances, and explore all available resource endpoints.

The **ChatbotX API** is a RESTful HTTP API that gives you programmatic access to every resource in your Workspace — contacts, tags, custom fields, conversations, broadcasts, flows, sequences, and more. You can use the API to build integrations, automate workflows, import data, send messages, and trigger automation from any system that can make HTTP requests.

## Authentication

The ChatbotX API uses **Bearer token authentication**. All requests must include your API Access Token in the `Authorization` header.

### Getting Your API Token

Navigate to **Settings → Integrations → ChatbotX API Access Token** in your Workspace to generate or retrieve your token.

### Using the Token

Include the token in every API request as a Bearer token in the `Authorization` header:

```bash theme={null}
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  https://app.chatbotx.io/api/v1/workspaces
```

<Warning>
  Treat your API token like a password. Do not expose it in client-side code, public repositories, or URLs that appear in browser history.
</Warning>

## Base URLs

| Environment    | Base URL                      |
| -------------- | ----------------------------- |
| ChatbotX Cloud | `https://app.chatbotx.io/api` |
| Self-Hosted    | `https://{YOUR_DOMAIN}/api`   |

All endpoint paths in this documentation are relative to the base URL. For example, `GET /api/v1/contacts` maps to `https://app.chatbotx.io/api/v1/contacts` on cloud.

## Rate Limits

The API enforces a limit of **10,000 requests per minute** across all endpoints. Each API call counts as one request regardless of how many records it affects. Where possible, use bulk endpoints to maximize efficiency within this limit.

## Example Authentication Request

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url https://app.chatbotx.io/api/v1/workspaces \
    --header "Authorization: Bearer YOUR_API_TOKEN"
  ```

  ```python Python theme={null}
  import requests

  url = "https://app.chatbotx.io/api/v1/workspaces"
  headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const options = {
    method: 'GET',
    headers: { Authorization: 'Bearer YOUR_API_TOKEN' }
  };

  fetch('https://app.chatbotx.io/api/v1/workspaces', options)
    .then(res => res.json())
    .then(data => console.log(data))
    .catch(err => console.error(err));
  ```
</CodeGroup>

## Available Resources

<CardGroup cols={2}>
  <Card title="List Contacts" icon="list" href="/api-reference/contacts/list-contacts">
    Paginate and filter your contact database with keyword search and channel filters.
  </Card>

  <Card title="Create Contact" icon="user-plus" href="/api-reference/contacts/create-contact">
    Add a new contact to your Workspace with phone, email, and profile fields.
  </Card>

  <Card title="Get Contact" icon="user" href="/api-reference/contacts/get-contact">
    Retrieve a single contact by internal ID, email address, or phone number.
  </Card>

  <Card title="Update Contact" icon="user-pen" href="/api-reference/contacts/update-contact">
    Modify profile fields on an existing contact record.
  </Card>

  <Card title="Delete Contact" icon="user-minus" href="/api-reference/contacts/delete-contact">
    Permanently remove a contact and all associated records.
  </Card>

  <Card title="Upsert Contact" icon="arrows-rotate" href="/api-reference/contacts/upsert-contact">
    Create a contact if they don't exist, or update their fields if they do.
  </Card>

  <Card title="Import Contacts" icon="file-import" href="/api-reference/contacts/import-contacts">
    Bulk-import contacts from an uploaded file with column field mapping.
  </Card>

  <Card title="Send Message" icon="message" href="/api-reference/contacts/send-message">
    Send a text message, file, or flow node to a contact on any active channel.
  </Card>

  <Card title="Send Flow" icon="diagram-project" href="/api-reference/contacts/send-flow">
    Trigger an automation flow for a specific contact.
  </Card>

  <Card title="Contact Tags" icon="tag" href="/api-reference/contacts/tags">
    Add, remove, and list tags on a contact.
  </Card>

  <Card title="Contact Custom Fields" icon="sliders" href="/api-reference/contacts/custom-fields">
    Read and write custom field values for a contact.
  </Card>

  <Card title="List Custom Fields" icon="table-columns" href="/api-reference/custom-fields/list">
    Retrieve all custom field definitions in your Workspace.
  </Card>

  <Card title="Create Custom Field" icon="square-plus" href="/api-reference/custom-fields/create">
    Define a new custom field with a name and data type.
  </Card>

  <Card title="Update Custom Field" icon="pen-to-square" href="/api-reference/custom-fields/update">
    Rename or move a custom field to a different folder.
  </Card>

  <Card title="Delete Custom Field" icon="trash" href="/api-reference/custom-fields/delete">
    Permanently remove a custom field and all its stored values.
  </Card>

  <Card title="List Tags" icon="tags" href="/api-reference/tags/list">
    Retrieve all tags defined in your Workspace.
  </Card>

  <Card title="Create Tag" icon="tag" href="/api-reference/tags/create">
    Create a new tag for labelling and segmenting contacts.
  </Card>

  <Card title="Update Tag" icon="pen-to-square" href="/api-reference/tags/update">
    Rename an existing tag in your Workspace.
  </Card>

  <Card title="Delete Tag" icon="trash" href="/api-reference/tags/delete">
    Permanently remove a tag from your Workspace.
  </Card>

  <Card title="List Flows" icon="diagram-project" href="/api-reference/flows/list">
    Retrieve all automation flows in your Workspace.
  </Card>

  <Card title="List Sequences" icon="layer-group" href="/api-reference/sequences/list">
    Retrieve all message sequences with engagement metrics.
  </Card>

  <Card title="Get Sequence" icon="layer-group" href="/api-reference/sequences/get">
    Fetch full details for a single message sequence.
  </Card>

  <Card title="List Broadcasts" icon="bullhorn" href="/api-reference/broadcasts/list">
    Retrieve all broadcasts with scheduling and reach details.
  </Card>

  <Card title="Get Broadcast" icon="bullhorn" href="/api-reference/broadcasts/get">
    Fetch a single broadcast by ID or name.
  </Card>

  <Card title="List Channels" icon="plug" href="/api-reference/channels/list">
    Retrieve all connected messaging channels in your Workspace.
  </Card>

  <Card title="Get Workspace" icon="building" href="/api-reference/workspace/get">
    Fetch your Workspace configuration and settings.
  </Card>

  <Card title="Workspace Members" icon="users" href="/api-reference/workspace/members">
    List and retrieve workspace members with their permissions.
  </Card>

  <Card title="Workspace Teams" icon="people-group" href="/api-reference/workspace/teams">
    Retrieve all agent teams in your Workspace.
  </Card>

  <Card title="List AI Agents" icon="robot" href="/api-reference/ai-agents/list">
    Retrieve all AI agents configured in your Workspace.
  </Card>
</CardGroup>
