> For the complete documentation index, see [llms.txt](https://docs.amitysolutions.com/ekoai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amitysolutions.com/ekoai/getting-started/eko/bot-integrations/create-bot-integration-via-api.md).

# Create Bot Integration via API

## Bot Integration

### Create Bot Integration

<mark style="color:green;">`POST`</mark> `https://{{domain-admin}}.ekoapp.com/bot-integration`

create bot integration

**Headers**

| Name         | Type   | Description                                                             |
| ------------ | ------ | ----------------------------------------------------------------------- |
| Accept       | string | application/json, text/plain, */*                                       |
| Content-type | string | application/x-www-form-urlencoded                                       |
| X-XSRF-TOKEN | string | CSRF token for request validation. Obtained from the XSRF-TOKEN cookie. |
| Cookie       | string | Session cookies including adonis-session and XSRF-TOKEN.                |

**Request Body Parameters**

| Name              | Type    | Description                                                                                              |
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------- |
| enabled\*         | boolean | Enable or disable the bot integration. Accepts true or false.                                            |
| firstname\*       | string  | First name of the bot.                                                                                   |
| lastname          | string  | Last name of the bot.                                                                                    |
| username\*        | string  | Unique username identifier for the bot.                                                                  |
| position          | string  | Position or role title of the bot (e.g., "Customer Support").                                            |
| status            | string  | Status message for the bot.                                                                              |
| webhookUrl\*      | string  | The webhook URL that will receive incoming messages and events. Must be a valid URL (HTTPS recommended). |
| avatar            | string  | URL or file reference for the bot's avatar image.                                                        |
| coverPhoto        | string  | URL or file reference for the bot's cover photo.                                                         |
| integrationType\* | string  | Type of integration. Use webhook for webhook-based integrations.                                         |

{% tabs %}
{% tab title="200" %}

```javascript
{
  "status": "success",
  "data": {
    "id": "bot_abc123",
    "enabled": true,
    "firstname": "MyBot",
    "lastname": "Assistant",
    "username": "mybot-assistant",
    "position": "Customer Support",
    "status": "online",
    "webhookUrl": "https://your-server.com/webhook",
    "integrationType": "webhook",
    "createdAt": "2026-03-13T10:00:00.000Z",
    "updatedAt": "2026-03-13T10:00:00.000Z"
  }
}
```

{% endtab %}
{% endtabs %}

```
// example
curl --location 'https://{{domain}}-admin.ekoapp.com/bot-integration' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json, text/plain, */*' \
--header 'X-XSRF-TOKEN: {xsrf_token}' \
--header 'Cookie: adonis-session={session_id}; XSRF-TOKEN={xsrf_token}' \
--data-urlencode 'enabled=true' \
--data-urlencode 'firstname=MyBot' \
--data-urlencode 'lastname=Assistant' \
--data-urlencode 'username=mybot-assistant' \
--data-urlencode 'position=Customer Support' \
--data-urlencode 'status=online' \
--data-urlencode 'webhookUrl=https://your-server.com/webhook' \
--data-urlencode 'avatar=' \
--data-urlencode 'coverPhoto=' \
--data-urlencode 'integrationType=webhook'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.amitysolutions.com/ekoai/getting-started/eko/bot-integrations/create-bot-integration-via-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
