Zaptickdocs
Resource

Messages

Send WhatsApp templates, free-form text, and media — and list delivery history.

#About

Messages are the atom of the Zaptick API. Every other resource (campaigns, workflows, chatbots, flows) ultimately produces messages sent to end-users.

New conversations must start with a pre-approved template. Once the user replies, a 24-hour service window opens and you can use sendText freely until it expires.

#Endpoints

  • POST/sendSend a WhatsApp template message (opens a new conversation).
  • POST/send-textSend a free-form text reply within the 24h service window.
  • GET/messagesList messages for a conversation (newest-first, paginated).
POST/send

Send a WhatsApp template message (opens a new conversation).

SDK
TypeScript
await zaptick.messages.send({
  phone: '+919876543210',
  templateName: 'welcome_message',
  language: 'en',
  variables: { '1': 'Priya' },
  mediaHeader: { url: 'https://cdn.example.com/banner.jpg', type: 'image' },
});
Request body
JSON
{
  "phone": "+919876543210",
  "templateName": "welcome_message",
  "language": "en",
  "variables": { "1": "Priya" },
  "mediaHeader": {
    "url": "https://cdn.example.com/banner.jpg",
    "type": "image"
  }
}
Response
JSON
{
  "success": true,
  "messageId": "wamid.HBgNOTEy...",
  "status": "sent",
  "costCredits": 0.68
}
POST/send-text

Send a free-form text reply within the 24h service window.

SDK
TypeScript
await zaptick.messages.sendText({
  phone: '+919876543210',
  message: 'Hey! Your order ships tomorrow.',
});
Request body
JSON
{
  "phone": "+919876543210",
  "message": "Hey! Your order ships tomorrow."
}
Response
JSON
{ "success": true, "messageId": "wamid.HBgN..." }
GET/messages

List messages for a conversation (newest-first, paginated).

SDK
TypeScript
const { messages } = await zaptick.messages.list({
  conversationId: 'conv_01J3xkx7...',
  limit: 50,
  cursor: 'cur_next',
});
Response
JSON
{
  "messages": [
    {
      "id": "msg_01J3...",
      "direction": "outbound",
      "type": "template",
      "templateName": "welcome_message",
      "status": "delivered",
      "createdAt": "2026-04-21T08:12:00.000Z"
    }
  ],
  "nextCursor": "cur_next2"
}