WhatsApp API Platform
Chatbots

Create chatbot

POST
/api/v1/chatbots/create

Create a new chatbot. A successful create returns the chatbot in DRAFT status; build its flow from the dashboard, then activate it.

Authorization

ApiKeyAuth
X-API-Key<token>

API key from your dashboard (Settings > API Keys)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/chatbots/create" \  -H "Content-Type: application/json" \  -d '{    "name": "Support Bot",    "description": "Handles first-line customer support",    "trigger_type": "FIRST_MESSAGE"  }'
{
  "success": true,
  "data": {
    "id": "cbt_abc123",
    "user_id": "string",
    "name": "string",
    "description": "string",
    "status": "DRAFT",
    "trigger_type": "MESSAGE_CONTAINS",
    "trigger_config": {},
    "start_node_id": "string",
    "active_version_id": "string",
    "variables": [
      {
        "id": "string",
        "name": "string",
        "type": "string",
        "default_value": null,
        "description": "string",
        "is_required": true
      }
    ],
    "settings": {
      "session_timeout_minutes": 0,
      "fallback_message": "string",
      "max_retries": 0,
      "handoff_enabled": true,
      "handoff_team_id": "string"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "node_count": 0
  }
}
{
  "success": false,
  "message": "to field is required"
}
{
  "success": false,
  "message": "user not authenticated"
}
{
  "success": false,
  "message": "forbidden"
}
{
  "success": false,
  "message": "internal server error"
}