Skip to main content
POST
/
v1
/
admin
/
bots
cURL
curl --request POST \
  --url https://api.botpress.cloud/v1/admin/bots \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "states": {},
  "events": {},
  "recurringEvents": {},
  "subscriptions": {
    "events": {}
  },
  "actions": {},
  "configuration": {
    "data": {},
    "schema": {}
  },
  "user": {
    "tags": {}
  },
  "conversation": {
    "tags": {}
  },
  "message": {
    "tags": {}
  },
  "tags": {},
  "code": "<string>",
  "name": "<string>",
  "medias": [
    {
      "url": "<string>",
      "name": "<string>"
    }
  ],
  "url": "<string>",
  "dev": true
}'
{
  "bot": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "signingSecret": "<string>",
    "integrations": {},
    "plugins": {},
    "maxExecutionTime": 123,
    "user": {
      "tags": {}
    },
    "conversation": {
      "tags": {}
    },
    "message": {
      "tags": {}
    },
    "states": {},
    "configuration": {
      "data": {},
      "schema": {}
    },
    "events": {},
    "recurringEvents": {},
    "subscriptions": {
      "events": {}
    },
    "actions": {},
    "tags": {},
    "name": "<string>",
    "deployedAt": "2023-11-07T05:31:56Z",
    "dev": true,
    "createdBy": "<string>",
    "alwaysAlive": true,
    "status": "active",
    "medias": [
      {
        "url": "<string>",
        "name": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-workspace-id
string
required

Workspace ID

x-multiple-integrations
string

Whether the client supports bots with multiple instances of the same integration. Set to "true" to receive integration instances keyed by their alias instead of their id. This header will be removed in the future, and the API will always return multiple instances keyed by alias.

Body

application/json

Bot metadata

states
object

A mapping of states to their definition

events
object

Events definition

recurringEvents
object
subscriptions
object

Subscriptions of the bot

actions
object

Actions definition

configuration
object
user
object
conversation
object
message
object
tags
object

Optional attributes of the Bot

code
string

JavaScript code of the bot

name
string

Optional name for the bot, if not provided will be auto-generated

Minimum length: 1
medias
object[]

Media files associated with the Bot

url
string

URL of the Bot; Only available for dev bots

dev
boolean

Indicates if the Bot is a development bot; Development bots run locally and can install dev integrations

Response

Success

bot
object
required