Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
create
/
template
Create Template
curl --request POST \
  --url https://api.example.com/v1/businesses/{businessId}/create/template
Submit a new WhatsApp template to Meta for review. Templates cannot be used until Meta approves them — typically within 5 minutes but up to 24 hours. Check approval status using Get templates.

Endpoint

POST https://api.connectly.ai/v1/businesses/{businessId}/create/template

Request body

FieldTypeRequiredDescription
namestringYesTemplate name. Used to reference the template when sending messages.
languageobjectYesLanguage object with a single code field (e.g. { "code": "en_US" }). See Meta’s supported languages.
categorystringYesTemplate category: MESSAGE_TEMPLATE_GROUP_CATEGORY_MARKETING, MESSAGE_TEMPLATE_GROUP_CATEGORY_UTILITY, or MESSAGE_TEMPLATE_GROUP_CATEGORY_AUTHENTICATION.
template_componentsarrayYesOrdered list of component objects defining the template structure. See Template components.

Response

{
  "entity": {
    "id": "template_name",
    "name": "template_name",
    "category": "MARKETING",
    "templates": [
      {
        "id": "1385622408844485",
        "language": { "code": "en_US" },
        "status": "MESSAGE_TEMPLATE_STATUS_PENDING",
        "createdAt": "2023-01-18T01:07:20.075195879Z",
        "updatedAt": "2023-01-18T01:07:20.075195879Z",
        "templateComponents": [...],
        "rejectionReason": null
      }
    ]
  }
}
The template starts with status: MESSAGE_TEMPLATE_STATUS_PENDING. Once Meta reviews it, the status transitions to approved or rejected.

Examples

{
  "name": "simple_greeting",
  "language": { "code": "en_US" },
  "template_components": [
    {
      "body": {
        "text": { "text": "Thanks for reaching out! We'll be in touch shortly." }
      }
    }
  ]
}
Variables use {{N}} syntax, numbered sequentially from 1.
{
  "name": "order_confirmation",
  "language": { "code": "en_US" },
  "template_components": [
    {
      "body": {
        "text": {
          "text": "Hi {{1}}, your order {{2}} has been confirmed and will arrive by {{3}}."
        }
      }
    }
  ]
}
Provide an example image URL in example to speed up Meta’s approval review.
{
  "name": "product_launch",
  "language": { "code": "en_US" },
  "template_components": [
    {
      "header": {
        "media": {
          "type": "TYPE_IMAGE",
          "example": ["https://cdn.connectly.ai/example/product.png"]
        }
      }
    },
    {
      "body": {
        "text": {
          "text": "Hi {{1}}, check out our new product — {{2}}. Available now!"
        }
      }
    }
  ]
}
Up to 3 quick reply buttons. Cannot be combined with URL or phone buttons.
{
  "name": "confirm_appointment",
  "language": { "code": "en_US" },
  "template_components": [
    {
      "body": {
        "text": { "text": "Can you make your appointment on {{1}}?" }
      }
    },
    { "button": { "quickReply": { "text": "Confirm" } } },
    { "button": { "quickReply": { "text": "Reschedule" } } },
    { "button": { "quickReply": { "text": "Cancel" } } }
  ]
}
Do not use shortened URLs — WhatsApp rejects them. You can add a dynamic suffix variable to the URL.
{
  "name": "track_order",
  "language": { "code": "en_US" },
  "template_components": [
    {
      "body": {
        "text": { "text": "Your order is on its way! Track it here:" }
      }
    },
    {
      "button": {
        "url": {
          "text": "Track my order",
          "url": "https://example.com/track/{{1}}"
        }
      }
    }
  ]
}
{
  "name": "contact_support",
  "language": { "code": "en_US" },
  "template_components": [
    {
      "body": {
        "text": { "text": "Need help? Call our support team directly." }
      }
    },
    {
      "button": {
        "phoneNumber": {
          "text": "Call support",
          "phoneNumber": "+16044441234"
        }
      }
    }
  ]
}