Campaigns
List Campaign Messages
Returns the messages of a specific campaign with sending status and pagination.
POST
https://api.zapzapapi.com/api/v1/{instanceId}/sender/listmessagesAuthentication with the x-api-key and x-api-secret headers.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
folder_id | text | body | Yes | Campaign folder ID |
Request example
curl
curl -X POST "https://api.zapzapapi.com/api/v1/{instanceId}/sender/listmessages" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{"folder_id":"folder_abc123"}'Node.js
const res = await fetch("https://api.zapzapapi.com/api/v1/{instanceId}/sender/listmessages", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"x-api-secret": "YOUR_API_SECRET",
"Content-Type": "application/json",
},
body: JSON.stringify({
"folder_id": "folder_abc123"
}),
});
console.log(await res.json());Python
import requests
res = requests.post(
"https://api.zapzapapi.com/api/v1/{instanceId}/sender/listmessages",
headers={"x-api-key": "YOUR_API_KEY", "x-api-secret": "YOUR_API_SECRET"},
json={"folder_id":"folder_abc123"},
)
print(res.json())Response example
JSON
{
"messages": [
{
"id": "554899453468:3EB01C21C13D0C4BA33F40",
"chatid": "554898101892@s.whatsapp.net",
"status": "Sent",
"text": "Teste",
"messageType": "Conversation",
"send_folder_id": "r5819c9fba43b98"
}
],
"pagination": {
"limit": 1000,
"offset": 0,
"totalRecords": 1
}
}Values are illustrative; the fields follow the real response format.
Other endpoints in this category
Get your API keys
Create your account, connect a number in minutes and start using the API. R$15 per active number/month, with a welcome credit when you create the account, subject to the current campaign.
