Skip to main content

Base URL

All API requests should be made to:
https://api.zavu.dev/v1

Authentication

All endpoints require Bearer token authentication:
Authorization: Bearer zv_live_xxxxxxxxxxxxxxxx
See Authentication for details on obtaining and using API keys.

Request Format

  • All request bodies must be JSON
  • Include Content-Type: application/json header
  • Phone numbers must be in E.164 format (e.g., +56912345678)

Response Format

All responses are JSON. Successful responses include the resource:
{
  "message": {
    "id": "msg_abc123",
    "status": "queued",
    ...
  }
}
Error responses follow a standard format:
{
  "error": {
    "code": "bad_request",
    "message": "Invalid phone number format"
  }
}

HTTP Status Codes

CodeDescription
200Success
201Resource created
202Accepted (async processing)
204No content (successful deletion)
400Bad request - invalid parameters
401Unauthorized - invalid API key
403Forbidden - insufficient permissions
404Not found
409Conflict - duplicate idempotency key
429Rate limit exceeded
500Internal server error

Rate Limits

EndpointLimit
POST /v1/messages100 requests/second
GET /v1/messages1000 requests/minute
All other endpoints1000 requests/minute
Rate limit headers are included in responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000

Pagination

List endpoints support cursor-based pagination:
GET /v1/messages?limit=50&cursor=abc123
ParameterTypeDescription
limitintegerItems per page (default: 50, max: 100)
cursorstringCursor from previous response
Response includes pagination info:
{
  "items": [...],
  "nextCursor": "xyz789"
}

Idempotency

For POST requests, include an idempotencyKey to prevent duplicates:
{
  "to": "+56912345678",
  "text": "Hello!",
  "idempotencyKey": "unique-request-id"
}
Duplicate requests return 409 Conflict with the original resource.

Resources