Skip to content

REST API

This page documents the DialoX REST API.

Authorization

All REST calls need authorization using an API token. For a single bot, the API token can be found in the studio, under Channels → REST API. Alternatively, it is possible to use an environment-level API token here, which can be found in the studio under Administration → Organisation → (select enviroment) → "API" side panel.

Preferably, the API Token must be passed as the Authorization: request header bearer token, as follows:

Authorization: Bearer f181eab8c44ef9ff8d6fedbed7692b0b

Alternatively, the API key can be added to the URL as a query parameter named api_key, for instance;

https://bsqd.me/api/bot/66bfa5d1-ad06-409f-b7a6-112f5fa94ab5?api_key=f181eab8c44ef9ff8d6fedbed7692b0b

Passing api_key= in the query parameters can be dangerous as this exposes the API key to e.g. request logging. It should only be used sparingly.

REST endpoints

Rate limiting

REST endpoints falling under /api/:bot/user/:user_id/conversation are subject to a rate limit at a maximum of 100 requests per 60 seconds.

Other REST endpoints are currently not rate limited.