List SMS templates
GET/sms/templates
Returns the workspace's SMS templates, newest first. These are the templates the SMS campaign wizard and the automations Send SMS block offer. Inactive templates are left out unless include_inactive=true.
Requires
Authorization: Bearer <api_key>. Create a key in the Inspra dashboard under Workspace Settings → API Keys.Query parameters
- pageinteger≥ 1optional1-based page index. Defaults to 1.Default
1 - page_sizeinteger1–100optionalItems per page. Defaults to 20. Hard-capped at 100 by the server.Default
20 - searchstringoptionalCase-insensitive substring match on the name or body.
- categorystringoptional
- include_inactivebooleanoptionalDefault
false
Response 200 OK
Paginated template list.
- dataobject[]required
9 fields
- idstringuuidoptional
- namestring0–255 charsoptional
- categorystringnullable0–100 charsoptional
- bodystring0–1600 charsoptional
- variablesstring[]optionalDetected from the body; read-only.
- segmentsintegeroptional
- is_activebooleanoptionalInactive templates are hidden from pickers but keep working where already linked.
- created_atstringdate-timeoptional
- updated_atstringdate-timeoptional
- paginationobjectrequiredEchoed pagination block on every list response.
pageandpage_sizematch the request (or the defaults if omitted);totalis the count of matching rows across all pages.3 fields
- pageinteger≥ 1required1-based page index of this response.
- page_sizeinteger≥ 1requiredNumber of items per page (request cap is 100).
- totalinteger≥ 0requiredTotal matching items across all pages.
Errors
- 401UnauthorizedMissing, malformed, or invalid API key.
- 403ForbiddenWorkspace unavailable, suspended, or paywalled.
- 429Too Many RequestsWorkspace request limit exceeded; shared across all its API keys.