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

Create template full

POST /template/
Authorization: Bearer <cartat_api_token>
Content-Type: application/json

Use this endpoint to submit a complete template for approval. A full template can include a header, body, footer, and buttons.

Request body

Field
Type
Required
Description

name

string

Yes

Template name. Use letters, numbers, and underscores only.

category

string

Yes

One of AUTHENTICATION, UTILITY, or MARKETING.

language

string

No

Template language code.

components

array

Yes

Template components.

Example

{
  "name": "order_update_full",
  "category": "UTILITY",
  "language": "en_US",
  "components": [
    {
      "type": "HEADER",
      "format": "TEXT",
      "text": "Order update",
      "example": {
        "header_handle": ["header_example"]
      }
    },
    {
      "type": "BODY",
      "text": "Hello {{customer_name}}, your order {{order_id}} is now {{status}}.",
      "example": {
        "body_text_named_params": [
          {
            "param_name": "customer_name",
            "example": "John"
          },
          {
            "param_name": "order_id",
            "example": "ORD-1001"
          },
          {
            "param_name": "status",
            "example": "shipped"
          }
        ]
      }
    },
    {
      "type": "FOOTER",
      "text": "Thanks for shopping with us."
    },
    {
      "type": "BUTTONS",
      "buttons": [
        {
          "type": "URL",
          "text": "Track order",
          "url": "https://example.com/orders/{{1}}",
          "variable": true,
          "example": ["ORD-1001"]
        }
      ]
    }
  ]
}

Response