POST
https://swiftchats.axis96.xyz
/
api
/
send
/
template
curl --request POST \
  --url https://swiftchats.axis96.xyz/api/send/template \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "phone": "+254720055819",
  "template": {
    "name": "hello_world",
    "language": {
      "code": "en_US"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          {
            "type": "text",
            "text": "Daniel"
          },
          {
            "type": "text",
            "text": "14"
          }
        ]
      }
    ]
  }
}'
{
  "statusCode": 200,
  "data": {
    "success": true,
    "data": {
      "messaging_product": "whatsapp",
      "contacts": [
        {
          "input": "+254720055819",
          "wa_id": "254720055819"
        }
      ],
      "messages": [
        {
          "id": "wamid.HBgMMjU0NzIwMDU1ODE5FQIAERgSOTBCNUMxNUY2MzVGQjIyMUU1AA==",
          "message_status": "accepted"
        }
      ],
      "chat": {
        "organization_id": 3,
        "wam_id": "wamid.HBgMMjU0NzIwMDU1ODE5FQIAERgSOTBCNUMxNUY2MzVGQjIyMUU1AA==",
        "contact_id": 1,
        "type": "outbound",
        "metadata": "{\"type\":\"text\",\"text\":{\"body\":\"Are you interested in quoting. Please send more details here.\",\"footer\":\"carplans a div of Socovered\"},\"buttons\":[{\"type\":\"QUICK_REPLY\",\"text\":\"Car insurance\",\"value\":\"Car insurance\"},{\"type\":\"QUICK_REPLY\",\"text\":\"Home Insurance\",\"value\":\"Home Insurance\"},{\"type\":\"QUICK_REPLY\",\"text\":\"Building insurance\",\"value\":\"Building insurance\"}]}",
        "media_id": null,
        "status": "accepted",
        "created_at": "2024-07-01 10:27:37",
        "uuid": "9196ab05-813f-4037-a323-c890b997ee0b",
        "id": 14
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json · object

Response

200 - application/json

OK

The response is of type object.