/v1/textSends a plain text message.
| Key | Description |
|---|---|
x-znx-token | Your bot instance token. (Required) |
| Parameter | Type | Status | Description |
|---|---|---|---|
number | string | Required | Recipient number with country code (e.g., 62812xxxx). |
text | string | Required | The message content. |
curl -X POST '__BASE_URL__/v1/text' \
--header 'x-znx-token: __YOUR_TOKEN__' \
--header 'Content-Type: application/json' \
--data-raw '{
"number": "6281234567890",
"text": "Hello, this is a test message."
}'/v1/mediaSends a media file from a URL.
| Key | Description |
|---|---|
x-znx-token | Your bot instance token. (Required) |
| Parameter | Type | Status | Description |
|---|---|---|---|
number | string | Required | Recipient number. |
url | string | Required | Public URL of the image/video. |
caption | string | Optional | Caption for the media. |
curl -X POST '__BASE_URL__/v1/media' \
--header 'x-znx-token: __YOUR_TOKEN__' \
--header 'Content-Type: application/json' \
--data-raw '{
"number": "6281234567890",
"url": "https://i.imgur.com/example.jpeg",
"caption": "This is an image."
}'/v1/voiceSends an audio file as a voice note.
| Key | Description |
|---|---|
x-znx-token | Your bot instance token. (Required) |
| Parameter | Type | Status | Description |
|---|---|---|---|
number | string | Required | Recipient number. |
url | string | Required | Public URL of the audio file. |
curl -X POST '__BASE_URL__/v1/voice' \
--header 'x-znx-token: __YOUR_TOKEN__' \
--header 'Content-Type: application/json' \
--data-raw '{
"number": "6281234567890",
"url": "https://example.com/audio.mp3"
}'/v1/fileSends a file as a document.
| Key | Description |
|---|---|
x-znx-token | Your bot instance token. (Required) |
| Parameter | Type | Status | Description |
|---|---|---|---|
number | string | Required | Recipient number. |
url | string | Required | Public URL of the file. |
filename | string | Required | File name with extension. |
caption | string | Optional | Optional caption. |
curl -X POST '__BASE_URL__/v1/file' \
--header 'x-znx-token: __YOUR_TOKEN__' \
--header 'Content-Type: application/json' \
--data-raw '{
"number": "6281234567890",
"url": "https://example.com/document.pdf",
"filename": "report.pdf"
}'/v2/textSends a plain text message using a JID.
| Key | Description |
|---|---|
x-znx-token | Your bot instance token. (Required) |
| Parameter | Type | Status | Description |
|---|---|---|---|
jid | string | Required | Recipient JID (e.g., 62812xxxx@s.whatsapp.net or xxxxx-xxxx@g.us). |
text | string | Required | The message content. |
curl -X POST '__BASE_URL__/v2/text' \
--header 'x-znx-token: __YOUR_TOKEN__' \
--header 'Content-Type: application/json' \
--data-raw '{
"jid": "6281234567890@s.whatsapp.net",
"text": "Hello, this is a test message."
}'/v2/mediaSends a media file from a URL using a JID.
| Key | Description |
|---|---|
x-znx-token | Your bot instance token. (Required) |
| Parameter | Type | Status | Description |
|---|---|---|---|
jid | string | Required | Recipient JID. |
url | string | Required | Public URL of the image/video. |
caption | string | Optional | Caption for the media. |
curl -X POST '__BASE_URL__/v2/media' \
--header 'x-znx-token: __YOUR_TOKEN__' \
--header 'Content-Type: application/json' \
--data-raw '{
"jid": "6281234567890@s.whatsapp.net",
"url": "https://i.imgur.com/example.jpeg",
"caption": "This is an image."
}'/v2/voiceSends an audio file as a voice note using a JID.
| Key | Description |
|---|---|
x-znx-token | Your bot instance token. (Required) |
| Parameter | Type | Status | Description |
|---|---|---|---|
jid | string | Required | Recipient JID. |
url | string | Required | Public URL of the audio file. |
curl -X POST '__BASE_URL__/v2/voice' \
--header 'x-znx-token: __YOUR_TOKEN__' \
--header 'Content-Type: application/json' \
--data-raw '{
"jid": "6281234567890@s.whatsapp.net",
"url": "https://example.com/audio.mp3"
}'/v2/fileSends a file as a document using a JID.
| Key | Description |
|---|---|
x-znx-token | Your bot instance token. (Required) |
| Parameter | Type | Status | Description |
|---|---|---|---|
jid | string | Required | Recipient JID. |
url | string | Required | Public URL of the file. |
filename | string | Required | File name with extension. |
caption | string | Optional | Optional caption. |
curl -X POST '__BASE_URL__/v2/file' \
--header 'x-znx-token: __YOUR_TOKEN__' \
--header 'Content-Type: application/json' \
--data-raw '{
"jid": "6281234567890@s.whatsapp.net",
"url": "https://example.com/document.pdf",
"filename": "report.pdf"
}'