POST
/
zapi
/
{z-api-instance-id}
/
{destination-whatsapp-number}
/
message

Example JS Code to Send WhatsApp Message

const apiUrl = 'https://api.chatvolt.ai';
const apiKey = 'XXX';
const zApiInstanceId = 'XXX';
const destinationWhatsAppNumber = 'XXX';

const res = await fetch(`${apiUrl}/zapi/${zApiInstanceId}/${destinationWhatsAppNumber}/message`, {
  method: 'POST',
  body: JSON.stringify({
    message: 'Your message here',
    attachments: [],
  }),
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${apiKey}`,
  },
});

Authorizations

Authorization
string
headerrequired

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

Path Parameters

z-api-instance-id
string
required

ID of the Z-API instance

destination-whatsapp-number
string
required

WhatsApp number of the recipient

Body

application/json
message
string
attachments
string[]