POST
/
message
curl --request POST \
  --url https://chat.zoko.io/v2/message \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "channel": "whatsapp",
  "recipient": "919998880000",
  "type": "template",
  "message": "<string>",
  "caption": "<string>",
  "templateId": "greeting",
  "templateArgs": [
    "arg1"
  ],
  "templateLanguage": "en",
  "assign": {
    "assigneeId": "<string>",
    "override": true
  },
  "contacts": {
    "whatsappContacts": [
      {
        "name": {
          "prefix": "<string>",
          "firstName": "<string>",
          "middleName": "<string>",
          "lastName": "<string>",
          "suffix": "<string>",
          "formattedName": "<string>"
        },
        "org": {
          "company": "<string>",
          "department": "<string>",
          "title": "<string>"
        },
        "addresses": [
          {
            "url": "<string>",
            "street": "<string>",
            "city": "<string>",
            "state": "<string>",
            "zip": "<string>",
            "countryCode": "<string>",
            "country": "<string>"
          }
        ],
        "emails": [
          {
            "email": "<string>",
            "type": "<string>"
          }
        ],
        "phones": [
          {
            "phone": 919876543210,
            "type": "office"
          }
        ]
      }
    ]
  }
}'
{
  "status": "202",
  "statusText": "Accepted",
  "messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

apikey
string
header
required

Authentication is done via apikey provided for your account

Include the following in your request header

apikey: "your_apikey_here"

Body

application/json

Message data

SendMessage model used as request body for sending messages

Response

200
application/json

Sent Message Details

SendMessage model