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

Send Messages

The primary endpoint for sending WhatsApp messages is:

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

The provider is selected automatically from the instance data. In most cases, you do not need to send provider in the request.

Request examples

Sends a plain text message through Meta Cloud API when the instance is Meta.

{
  "number": "+966501234567",
  "message": "Hello, your order was received successfully."
}

Sends a pre-approved Meta template.

{
  "number": "+966501234567",
  "template_name": "order_update",
  "parameters": {
    "customer_name": "John",
    "order_id": "ORD-1001"
  }
}

Use this shape when the template has a header parameter:

{
  "number": "+966501234567",
  "template_name": "invoice_ready",
  "header": {
    "type": "document",
    "document": {
      "link": "https://example.com/invoice.pdf",
      "filename": "invoice.pdf"
    }
  },
  "parameters": {
    "customer_name": "John"
  }
}

Use this shape when the template has a URL button or quick reply:

Response

When Meta succeeds, the response follows this general shape:

{
  "status": "success",
  "id": "wamid.xxxxx",
  "from": "1234567890",
  "to": "966501234567",
  "type": "template",
  "provider": "meta",
  "response": {
    "messages": [
      {
        "id": "wamid.xxxxx"
      }
    ]
  }
}

Behavior by connection type

Connection type
Behavior

Meta

Supports text and template messages through the official connection.

QR

Supports text messages only in this endpoint and does not support templates.