Docs
Open dashboard

Create SMS template

POST/sms/templates

Creates an SMS template. Placeholders in the body are detected and returned as variables; the standard ones campaigns fill are first_name, last_name, email, company and phone_number, plus any workspace custom variables and any column in a campaign's contact list.

Requires Authorization: Bearer <api_key>. Create a key in the Inspra dashboard under Workspace Settings → API Keys.

Body application/json

  • namestring1–255 charsrequired
  • bodystring1–1600 charsrequired
    Use {{first_name}}-style placeholders for per-contact values.
  • categorystringnullable0–100 charsoptional

Response 201 Created

Template created.

  • idstringuuidoptional
  • namestring0–255 charsoptional
  • categorystringnullable0–100 charsoptional
  • bodystring0–1600 charsoptional
  • variablesstring[]optional
    Detected from the body; read-only.
  • segmentsintegeroptional
  • is_activebooleanoptional
    Inactive templates are hidden from pickers but keep working where already linked.
  • created_atstringdate-timeoptional
  • updated_atstringdate-timeoptional

Errors

  • 400Bad Request
    Validation failed / malformed request.
  • 401Unauthorized
    Missing, malformed, or invalid API key.
  • 403Forbidden
    Workspace unavailable, suspended, or paywalled.
  • 429Too Many Requests
    Workspace request limit exceeded; shared across all its API keys.