Skip to main content
GET
/
v1
/
templates
List Templates
curl --request GET \
  --url https://api.zavu.dev/v1/templates \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "id": "tpl_abc123",
      "name": "order_confirmation",
      "category": "transactional",
      "body": "Hi {{name}}, your order #{{orderId}} has been confirmed!",
      "variables": ["name", "orderId"],
      "channels": ["sms", "whatsapp"],
      "createdAt": "2024-01-15T10:00:00.000Z",
      "updatedAt": "2024-01-15T10:00:00.000Z"
    },
    {
      "id": "tpl_def456",
      "name": "shipping_update",
      "category": "transactional",
      "body": "Your order #{{orderId}} has shipped! Track it here: {{trackingUrl}}",
      "variables": ["orderId", "trackingUrl"],
      "channels": ["sms", "whatsapp"],
      "createdAt": "2024-01-14T09:00:00.000Z",
      "updatedAt": "2024-01-14T09:00:00.000Z"
    }
  ]
}
Retrieve a list of all message templates for your project.

Response

items
array
Array of template objects
{
  "items": [
    {
      "id": "tpl_abc123",
      "name": "order_confirmation",
      "category": "transactional",
      "body": "Hi {{name}}, your order #{{orderId}} has been confirmed!",
      "variables": ["name", "orderId"],
      "channels": ["sms", "whatsapp"],
      "createdAt": "2024-01-15T10:00:00.000Z",
      "updatedAt": "2024-01-15T10:00:00.000Z"
    },
    {
      "id": "tpl_def456",
      "name": "shipping_update",
      "category": "transactional",
      "body": "Your order #{{orderId}} has shipped! Track it here: {{trackingUrl}}",
      "variables": ["orderId", "trackingUrl"],
      "channels": ["sms", "whatsapp"],
      "createdAt": "2024-01-14T09:00:00.000Z",
      "updatedAt": "2024-01-14T09:00:00.000Z"
    }
  ]
}

Example

curl https://api.zavu.dev/v1/templates \
  -H "Authorization: Bearer zv_live_xxx"