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

# Overview

The WotNot API allows you to programmatically manage your WotNot account, knowledge bases, conversations, contacts, bots, and other resources without using the WotNot dashboard.

Use the API to integrate WotNot with your existing applications, automate repetitive tasks, or build custom workflows around your AI agents.

> [!NOTE]
>
> The WotNot API uses Bearer token authentication. Keep your API token secure and do not expose it in client-side applications.

## What you can do with the API

WotNot APIs cover several areas of the platform.

> [accordion] Knowledge Bases
>
> Create knowledge bases, add data sources, remove sources, and check training status.

> [accordion] Conversations
>
> Create conversations, send messages, update variables, manage assignees, and close conversations.

> [accordion] Contacts
>
> Create new contacts or update existing contacts using API requests.

> [accordion] Bots
>
> Create bots, retrieve bot flows, deploy flows, and fetch the list of bots in an account.

> [accordion] Webhooks
>
> Configure a webhook to receive conversation-related events from WotNot.

# Endpoints

Endpoint URL for all API integration with WotNot APIs are:

```text theme={null}
https://api.wotnot.io
```

### Knowledge Base

* [Create knowledge base](https://help.wotnot.io/create-kb): Create a knowledge base to train your AI Agents on your content.
* [Add text/file data sources](https://help.wotnot.io/adding-text-file-data-sources-to-a-knowledge-base): Upload files or text to a knowledge base as data sources.
* [Add URL data sources](https://help.wotnot.io/add-url-kb): Add specific web pages to a knowledge base, one data source per URL.
* [Add domain data source](https://help.wotnot.io/add-domain): Add a whole website domain to a knowledge base.
* [Delete data sources](https://help.wotnot.io/deleting-data): Remove one or more data sources from a knowledge base.
* [Get training status](https://help.wotnot.io/get-training-status): Check whether each data source is still training, trained or failed.
* [Get knowledge base](https://help.wotnot.io/fetch-kb): Get a knowledge base’s details and its data sources.

### Contact

* [Create contacts](https://help.wotnot.io/create-contact): Create new contacts and update existing ones in a single request.

### Conversation

* [Create conversation](https://help.wotnot.io/create-conversation): Start a conversation with a contact on WhatsApp or SMS and send the first message.
* [Send agent response](https://help.wotnot.io/agent-response): Pass an agent’s reply from your own system to the contact.
* [Close conversation](https://help.wotnot.io/colse-conversation): Close an open conversation.
* [Change assignee](https://help.wotnot.io/changing-assignee): Reassign an open conversation to another agent or a team.
* [Update variable](https://help.wotnot.io/update-variable): Update the variables in a conversation, such as the contact’s email or company.

### Webhook

* [Set webhook URL](https://help.wotnot.io/set-wehbook-url): Choose where your account receives conversation events, and which events to receive.

### Bot

* [Create bot](https://help.wotnot.io/create-bot): Create a new bot from an existing bot.
* [Get bot flow](https://help.wotnot.io/fetch-bot-flow): Get a bot’s flow JSON so you can edit it.
* [Deploy bot](https://help.wotnot.io/deploy-bot): Deploy a bot with an updated flow JSON.
* [List bots](https://help.wotnot.io/fetch-bot-list): List the bots in your account with their status, channels and owner.

### Account management

* [Get account roles](https://help.wotnot.io/fetch-account-roles): List the user roles in your account, what each can access, and who has it.
* [Invite user](https://help.wotnot.io/invite-user-to-account): Invite a user to your account with a role and get their invitation link.
* [Update user role](https://help.wotnot.io/update-user-role): Change the role of a user in your account.
* [Remove user](https://help.wotnot.io/remove-user-from-account): Remove a user from your account.

> [!NOTE]
>
> The API paths currently use both `/v1` and `/api/v1` prefixes. Use the endpoint path exactly as documented for each operation.

## HTTP status codes

| Status code | Meaning |
| :-: | :-: |
| 200 | Request completed successfully |
| 400 | Invalid request or request parameters |
| 401 | Authentication or authorization failed |
| 404 | Requested resource was not found |

# Troubleshooting

### 401 Unauthorized

A `401` response generally indicates that the account token is missing, invalid, or does not have access to the requested resource.

Check that:

* The `Authorization` header is present.
* The token is valid.
* The token is passed using the `Bearer <token>` format.

### 400 Bad Request

A `400` response indicates that the request could not be processed.

Check that:

* Required fields are included.
* Request parameters use the expected format.
* IDs belong to the correct WotNot account.
* The request body contains valid JSON when required.

### 404 Not Found

A `404` response indicates that the requested resource could not be found.

Check that the resource ID is correct and that the resource belongs to the account associated with your API token.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.