For the complete documentation index, see llms.txt. This page is also available as Markdown.

Chatbot Templates

Retrieves a specific WhatsApp template

get

Required Permission: chatbots.templates.get

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

templateIdstringRequired

The ID of the template to be retrieved.

workspaceIdstringRequired

The ID of the workspace.

Query parameters
channelIdanyRequired

The ID of the channel to which the template belongs.

Responses
200

Template details.

application/json
errorstringOptional

Optional error message.

get/v1/workspaces/{workspaceId}/chatbots/{chatbotId}/templates/{templateId}
GET /v1/workspaces/{workspaceId}/chatbots/{chatbotId}/templates/{templateId}?channelId=null HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "template": {
    "id": "6XAjCp0D1VeJarAR9mfe",
    "name": "order_confirmation",
    "category": "UTILITY",
    "rejectReason": "Content policy violation",
    "created": "2025-10-03T12:00:00Z",
    "updated": "2025-10-03T12:05:00Z",
    "translations": {
      "ANY_ADDITIONAL_PROPERTY": {
        "bodyText": "Thank you for your order {{1}}.",
        "buttonType": "QUICK_REPLY",
        "buttons": [
          {
            "type": "QUICK_REPLY",
            "text": "Confirm",
            "url": "https://example.com/order/{{1}}",
            "phoneNumber": "+1234567890"
          }
        ],
        "createdAt": "2025-10-03T12:00:00Z",
        "footerText": "Your support team",
        "headerMediaType": "TEXT",
        "headerText": "Order confirmation",
        "headerType": "TEXT",
        "language": "DE",
        "rejectReason": "Content policy violation",
        "status": "APPROVED",
        "templateId": "123456789012345",
        "updatedAt": "2025-10-03T12:05:00Z"
      }
    }
  },
  "error": "text"
}

Creates a new WhatsApp template

post

Required Permission: chatbots.templates.create

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

workspaceIdstringRequired

The ID of the workspace.

Body
channelIdstringRequired

The ID of the channel for which the template is created.

Example: t1o15pfRt7PBT5hvC9z4
namestringRequired

The name of the template.

Example: order_confirmation_v2
categorystringRequired

The category of the template (e.g., "UTILITY", "MARKETING").

Example: UTILITY
Responses
201

Template successfully submitted for review.

application/json
errorstringOptional

Optional error message.

post/v1/workspaces/{workspaceId}/chatbots/{chatbotId}/templates
POST /v1/workspaces/{workspaceId}/chatbots/{chatbotId}/templates HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 401

{
  "channelId": "t1o15pfRt7PBT5hvC9z4",
  "name": "order_confirmation_v2",
  "category": "UTILITY",
  "translations": {
    "ANY_ADDITIONAL_PROPERTY": {
      "bodyText": "Thank you for your order {{1}}.",
      "buttons": [
        {
          "type": "QUICK_REPLY",
          "text": "Confirm",
          "url": "https://example.com/order/{{1}}",
          "phoneNumber": "+1234567890"
        }
      ],
      "footerText": "Your support team",
      "headerText": "Order confirmation",
      "headerType": "TEXT",
      "language": "DE"
    }
  }
}
{
  "template": {
    "id": "6XAjCp0D1VeJarAR9mfe",
    "name": "order_confirmation",
    "category": "UTILITY",
    "rejectReason": "Content policy violation",
    "created": "2025-10-03T12:00:00Z",
    "updated": "2025-10-03T12:05:00Z",
    "translations": {
      "ANY_ADDITIONAL_PROPERTY": {
        "bodyText": "Thank you for your order {{1}}.",
        "buttonType": "QUICK_REPLY",
        "buttons": [
          {
            "type": "QUICK_REPLY",
            "text": "Confirm",
            "url": "https://example.com/order/{{1}}",
            "phoneNumber": "+1234567890"
          }
        ],
        "createdAt": "2025-10-03T12:00:00Z",
        "footerText": "Your support team",
        "headerMediaType": "TEXT",
        "headerText": "Order confirmation",
        "headerType": "TEXT",
        "language": "DE",
        "rejectReason": "Content policy violation",
        "status": "APPROVED",
        "templateId": "123456789012345",
        "updatedAt": "2025-10-03T12:05:00Z"
      }
    }
  },
  "error": "text"
}

Last updated