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>",
"description": "<string>",
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"url": "<string>",
"secrets": {},
"dev": true
}
'{
"bot": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signingSecret": "<string>",
"integrations": {},
"plugins": {},
"user": {
"tags": {}
},
"conversation": {
"tags": {}
},
"message": {
"tags": {}
},
"states": {},
"configuration": {
"data": {},
"schema": {}
},
"events": {},
"recurringEvents": {},
"subscriptions": {
"events": {}
},
"actions": {},
"tags": {},
"name": "<string>",
"dev": true,
"secrets": [
"<string>"
],
"alwaysAlive": true,
"status": "active",
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"maxExecutionTime": 123,
"description": "<string>",
"deployedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}
}Create bot
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>",
"description": "<string>",
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"url": "<string>",
"secrets": {},
"dev": true
}
'{
"bot": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signingSecret": "<string>",
"integrations": {},
"plugins": {},
"user": {
"tags": {}
},
"conversation": {
"tags": {}
},
"message": {
"tags": {}
},
"states": {},
"configuration": {
"data": {},
"schema": {}
},
"events": {},
"recurringEvents": {},
"subscriptions": {
"events": {}
},
"actions": {},
"tags": {},
"name": "<string>",
"dev": true,
"secrets": [
"<string>"
],
"alwaysAlive": true,
"status": "active",
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"maxExecutionTime": 123,
"description": "<string>",
"deployedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Workspace ID
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.
Bot metadata
A mapping of states to their definition
Show child attributes
Events definition
Show child attributes
Show child attributes
Subscriptions of the bot
Show child attributes
Actions definition
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
JavaScript code of the bot
Optional name for the bot, if not provided will be auto-generated
1Optional description for the bot
2000Secrets are values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing.
Show child attributes
Success
Show child attributes
Was this page helpful?