Skip to main content
Bot skills are processes every person who chats with a bot gets. Everything the Skills page of the dashboard does is also available over REST, so you can keep a bot’s skills next to your code and sync them on deploy.

Authentication

Create an API token under API Tokens in your account menu and tick the skills permission. Send it as a bearer token:
  • A token without the skills permission gets 403 on every endpoint.
  • The bot must belong to one of your teams. Any other bot id answers 404 bot_not_found, whether it exists or not.
  • Reading is open to every member of the bot’s team. Writing (create, update, delete, restore) also needs a team role with the update permission (Administrator or Editor), else 403 team_permission_required.
Keep the token on your server. Never put it in a web page or the widget.

Base URL

{bot} is the bot’s numeric id (shown in the dashboard URL, /bots/{id}). {name} is the skill’s name, the slug you gave it (weekly-report); upper-case letters are lower-cased.

The skill object

Endpoints

List skills

GET /bots/{bot}/skills returns the bot’s enabled skills by name, without content. Add ?include_disabled=1 to include switched-off ones.

Create a skill

POST /bots/{bot}/skills with name, summary, content and optionally enabled (default true). Answers 201 with the skill at version 1. Every conversation of the bot lists it from the next reply on.
A name that is already in use answers 422 skill_name_taken; the 51st skill of a bot answers 422 skill_limit_reached.

Get a skill

GET /bots/{bot}/skills/{name} returns the skill with its content.

Update a skill

PATCH /bots/{bot}/skills/{name} takes any of:
A version conflict carries the current skill so you can compare and retry:
A name in the body is refused with 422 skill_name_immutable: create a skill under the new name and delete the old one.
Changing a bot skill never changes the versions people customised for themselves. Their copy stays as it is; the dashboard marks it with bot default changed.

Delete a skill

DELETE /bots/{bot}/skills/{name} answers 204. The skill leaves every conversation from the next reply on and its name is free again. People’s own skills of the same name stay as their own skills.

List revisions

GET /bots/{bot}/skills/{name}/revisions returns the newest 10 versions, newest first:

Restore a revision

POST /bots/{bot}/skills/{name}/revisions/{version}/restore copies what that version said into the skill and saves it as a new version (nothing changes when the skill already says it). Returns the skill. A version that is not kept answers 404 revision_not_found.

Errors

Errors are JSON with a human-readable message and a stable code:

Next steps

Skills

How bot skills and personal skills work together

Bot skills and customisation

How people customise a bot skill and revert