Skip to main content

Method

GET /v1/comms/templates

Query Parameters

channel
string
Filter by delivery channel (e.g., email, sms, whatsapp, push_notification).
purpose
string
Filter by purpose (transactional or marketing).
status
string
Filter by status (draft, active, inactive, archived).

Headers

Authorization
string
Bearer token (requires comms:read).

Request Example

curl "https://api.voyantcloud.com/v1/comms/templates?channel=email&status=active" \
  -H "Authorization: Bearer $VOYANT_API_KEY"

Response Fields

Each template item includes:
  • id – Template ID (UUID).
  • workspace_id – Workspace owning the template.
  • name – Human-readable name.
  • key – Unique key used when sending notifications.
  • channel – Delivery channel.
  • purposetransactional or marketing.
  • status – Lifecycle status (draft, active, inactive, archived).
  • created_at / updated_at – ISO timestamps.

Response Example

{
  "items": [
    {
      "id": "tmpl_01J0CBFPXW7SP2N8A9Q7T2048Q",
      "workspace_id": "ws_01HZYPM2QF2R8X9SZQ0J9SYBCN",
      "name": "Booking Confirmation",
      "key": "booking_confirmation",
      "channel": "email",
      "purpose": "transactional",
      "status": "active",
      "created_at": "2025-01-08T10:22:31.000Z",
      "updated_at": "2025-02-02T14:12:40.000Z"
    }
  ]
}
Filters are applied server-side after fetching workspace templates. Provide multiple parameters to narrow the list (e.g., email + active transactional templates).