# API

BotTalk lets you add, delete, update and fetch articles using RESTful API.

You can also fetch statistics for your audio projects via Reports API.&#x20;

## Authorization

Sign your API Requests by including the following header:

`Authorization: Bearer <apikey>`

You can retrieve your API Key one the project configuration page.&#x20;

Project -> Configure this project -> Content Source

Two types of API keys are available: Write and Read-Only keys. You can re-generate API keys at will.

<figure><img src="/files/ZMjT73t3OEzcI0698u0U" alt=""><figcaption></figcaption></figure>

## Error Handling

If requests fails, you will receive the error response with a detailed description of the issue at hand:

```json
{
  "result": "error",
  "message": "Title is not set or is too short"
}
```

## Webhooks

{% hint style="info" %}
**Good to know:** Webhooks is a premium feature only available on Enterprise plans. Please get in touch with [BotTalk Support](https://bottalk.io/contact) to enable webhooks in your projects.&#x20;
{% endhint %}

Webhooks allow you to subscribe to notifications on article status changes.

Every time [article status](https://docs.bottalk.io/docs/integration/api-reference/articles#article-status) changes, our server will send a POST request to your webhook endpoint with the following body:

```json
{
    "id": "cc35e0996a2e8e449d21d6b646678e7e",
    "status": "ready",
    "title": "Kreisstadt wird bis 2030 weiterwachsen",
    "webhook_id": 42
}
```

`webhook_id` variable is meant to be autoincremented. It can never be the same. Also, it can never decrease.

{% hint style="warning" %}
We won’t check for the response code of your webhook, and we won’t resend this call if your endpoint doesn’t respond.
{% endhint %}


---

# 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.bottalk.io/docs/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.
