Get an SMS template's usage
GET/api/v1/sms/templates/{id}/usage
GET /sms/templates/{id}/usage
curl -X GET 'https://www.unitpost.com/api/v1/sms/templates/tmpl_123/usage' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'Response · 200
{
"object": "sms_template_usage",
"template_id": "template_123",
"live_campaigns": [
{
"id": "id_123",
"name": "Example",
"status": "queued"
}
],
"live_automations": [
{
"id": "id_123",
"name": "Example",
"status": "queued"
}
],
"pending_sends": 0,
"system_locked": false,
"can_edit_content": false,
"content_blocked_reason": "string",
"can_unpublish": false,
"unpublish_blocked_reason": "string"
}What uses an SMS template, and whether a change would be accepted now: its live campaigns and automations, queued texts, and can_edit_content / can_unpublish with the reason when not. Read it before an edit or delete. Requires the templates:read capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Response · 200 fields10 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
template_idrequired | string | — |
live_campaignsrequired | object[] | — |
live_automationsrequired | object[] | — |
pending_sendsrequired | integer | — |
system_lockedrequired | boolean | — |
can_edit_contentrequired | boolean | — |
content_blocked_reasonrequired | string | null | — |
can_unpublishrequired | boolean | — |
unpublish_blocked_reasonrequired | string | null | — |
200401403404422