Send Text Template

Send a text-based template message

post

Sends a template message to a specified client using placeholders and customizable parameters.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
businessnamestringRequired

The business name associated with the template.

Body
clientstringOptional

Client ID (required if client_phone is not provided).

client_phonestringOptional

Client phone number, with country prefix (required if client is not provided).

client_namestringOptional

Client's name, required with client_phone.

callback_urlstringOptional

URL to receive message status updates.

delaystringOptional

Delay before sending the message, e.g., "10d".

text_messagestringOptional

Template message text with placeholders like {{1}}.

agentsstring[]Optional

List of agent emails assigned to the chat.

Responses
chevron-right
200

Template message sent successfully.

application/json
successbooleanOptionalExample: true
post
/template
200

Template message sent successfully.

Body Example

{
  "client_phone": "3932132123", //phone with prefix
  "client_name": "Jon Doe",
  "callback_url": "https://webhook.domain.it/inbound", //callback to get results (sent/delivered/read)
  "delay": "10m", //10 minutes delay
  "text_message": "Hi {{1}}, my name is {{2}} and your order {{3}} is ready! Thanks for your support",
  "agents": [
      "email@agent.it"    //assign the chat to the agent with that email
  ],
  "template": {
    "name": "TEMPLATE_NAME",
    "language": {
      "code": "it"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          {
            "type": "text",
            "text": "Tom"
          },
          {
            "type": "text",
            "text": "Dylan"
          },
          {
            "type": "text",
            "text": "123OrdID"
          }
        ]
      }
    ]
  }
}

Meta official documentation

Last updated