Status & priority
Track a message from the moment it's queued to final delivery, and control how quickly it's processed with priority settings. This page covers checking status, message history, retries, and the priority levels that trade off speed against cost.
Checking message status
Fetch the current status of a message by its id.
curl https://api.tryzend.com/messages/{id} \
-H "x-api-key: YOUR_API_KEY"
{
"id": "6884da240f0e633b7b979bff",
"status": "delivered",
"channel_used": "whatsapp",
"to": "+233593152134",
"body": "Your verification code is: 123456",
"total_cost": 0.008,
"delivery_attempts": [
{
"channel": "whatsapp",
"status": "delivered",
"attempted_at": "2024-01-15T10:30:00Z",
"cost": 0.008
}
],
"created_at": "2024-01-15T10:29:55Z",
"sent_at": "2024-01-15T10:30:00Z",
"delivered_at": "2024-01-15T10:30:05Z"
}
The delivery_attempts array records each channel Zend tried, which is useful when you rely on channel fallback.
Status values
A message moves through these statuses over its lifetime:
| Status | Meaning |
|---|---|
pending | Queued and awaiting processing. |
sent | Handed off to the channel provider. |
delivered | Confirmed delivered to the recipient. |
failed | Delivery failed on all attempted channels. |
Message history
List past messages, filtering by status, channel, and paginating with limit and offset.
curl "https://api.tryzend.com/messages?limit=50&offset=0&status=delivered&channel=whatsapp" \
-H "x-api-key: YOUR_API_KEY"
{
"messages": [
{
"id": "6884da240f0e633b7b979bff",
"status": "delivered",
"channel_used": "whatsapp",
"to": "+233593152134",
"total_cost": 0.008,
"created_at": "2024-01-15T10:29:55Z"
}
],
"total": 150,
"page": 1,
"pages": 3
}
Retrying a failed message
Requeue a failed message for another delivery attempt using its id.
curl -X PUT https://api.tryzend.com/messages/{id}/retry \
-H "x-api-key: YOUR_API_KEY"
{
"id": "6884da240f0e633b7b979bff",
"status": "pending",
"estimated_cost": 0.02,
"message": "Message queued for retry"
}
Note
Priority levels
Set a message's priority to control how quickly it's processed. Higher priority means faster processing.
| Priority | Description | Processing time |
|---|---|---|
low | Non-urgent messages | 5-10 minutes |
normal | Standard messages | 1-2 minutes |
high | Important messages | 30 seconds |
urgent | Critical messages | Immediate |
Delivery priority
Alongside priority, delivery_priority tunes how Zend chooses a channel — optimizing for speed, cost, or reliability.
{
"to": "+233593152134",
"body": "URGENT: System outage detected",
"preferred_channels": ["sms", "whatsapp"],
"priority": "urgent",
"delivery_priority": "speed"
}
Request fields
low, normal, high, or urgent.speed, cost, or reliability.