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: <api-key>' \
  --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": {},
    "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.

x-workspace-id
string
header
required

Your workspace ID.

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

Tags 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 whether the Bot is a development bot; Development bots run locally and can install dev integrations

Response

200
application/json

Success

bot
object
required