Create and manage reusable SMS message templates with variable placeholders.SMS Live Mode Only: All SMS endpoints require a live mode API key (sk_live_*).
Create SMS Template#
Create a new SMS template with {{variable}} placeholders.Endpoint: POST /v1/sms/templates| Field | Type | Required | Description |
|---|
name | string | Yes | Template name |
body | string | Yes | Template body with {{variable}} placeholders |
description | string | No | Template description |
{
"data": {
"id": "tmpl_abc123",
"name": "Welcome Message",
"body": "Hello {{name}}! Welcome to {{company}}. Your account is now active.",
"description": "New user welcome message",
"created_at": "2024-01-15T10:30:00Z"
}
}
Get SMS Template#
Get details of a specific SMS template.Endpoint: GET /v1/sms/templates/{id}List SMS Templates#
Get a paginated list of SMS templates.Endpoint: GET /v1/sms/templates| Parameter | Type | Required | Description |
|---|
offset | integer | No | Number of items to skip (default: 0) |
limit | integer | No | Maximum number of items to return (default: 20, max: 100) |
Update SMS Template#
Update an existing SMS template.Endpoint: PUT /v1/sms/templates/{id}| Field | Type | Required | Description |
|---|
name | string | No | Template name |
body | string | No | Template body |
description | string | No | Template description |
Delete SMS Template#
Endpoint: DELETE /v1/sms/templates/{id}Success Response (204): No content