> ## Documentation Index
> Fetch the complete documentation index at: https://docs.telzino.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create SMS Template

> Creates a new SMS template in one of the account's organizations.

## Body Parameters

<ParamField body="organization_id" type="string" required>
  The organization to create the template in (UUID). Must belong to the account.

  A value that is not a well-formed UUID is rejected by schema validation, so it returns the
  same shape as any other invalid field — `400` with
  `{"error": "validation_error", "issues": [{"path": "organization_id", "message": "Invalid organization_id"}]}`.
  Validation runs before the ownership check, so a malformed id never reaches the `403` path.
  A well-formed UUID belonging to another account returns `403`
  (`{"error": "organization not accessible"}`).

  Note the flat `{"error": "invalid organization_id"}` body belongs to the **list** endpoint,
  which checks its `organization_id` query parameter with a regex rather than through the
  schema.
</ParamField>

<ParamField body="name" type="string" required>
  Template name, max 100 chars. Must be unique within the organization.
</ParamField>

<ParamField body="message_type" type="string" required>
  `sms` or `mms`. Immutable after creation.
</ParamField>

<ParamField body="description" type="string">
  Optional description, max 300 chars.
</ParamField>

<ParamField body="body" type="string">
  The message body. May contain `{{token}}` placeholders and `{{token|fallback}}` syntax.
</ParamField>

<ParamField body="tags" type="string[]">
  Optional free-form tags.
</ParamField>

<ParamField body="from_number" type="string">
  Optional sender identity: a phone number, short code, or alphanumeric sender ID. When
  set, it overrides the From Number on the sending agent's **Send SMS** function.

  A **phone number must be an SMS-capable number on the organization's Twilio account**
  (see [Twilio](/integrations/twilio)). Agents connected before credentials moved to the
  organization may still carry their own, and those continue to work. Validity is
  account-specific and is **not** checked at template creation — it is verified when the
  template is assigned to an agent (in the agent's Send SMS settings). A number the
  sending account does not own is rejected by the carrier at send time with error
  `21606`. Leave empty to use the agent's own From Number, set on its Send SMS function.
</ParamField>

<ParamField body="status" type="string" default="draft">
  `draft` or `active`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.telzino.com/v1/sms-templates" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "organization_id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Appointment reminder",
      "message_type": "sms",
      "body": "Hi {{caller_name|there}}, your appointment is confirmed. Reply STOP to opt out.",
      "status": "active"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  { "data": { "id": "3f2a...", "name": "Appointment reminder", "status": "active", "version": 1 } }
  ```

  ```json 400 theme={null}
  { "error": "validation_error", "issues": [ { "path": "name", "message": "Name too long (max 100)" } ] }
  ```

  ```json 403 theme={null}
  { "error": "sms_templates_locked" }
  ```

  ```json 403 theme={null}
  { "error": "organization not accessible" }
  ```

  ```json 409 theme={null}
  { "error": "A template with this name already exists." }
  ```
</ResponseExample>

## Availability

Returns `403` when SMS Template Manager has been locked for `organization_id` by a
partner or reseller through Feature Administration.

Two different bodies share this status: `sms_templates_locked` means the organization is
yours but the feature is switched off for it, while `organization not accessible` means the
organization is not under your account at all. Check `error`, not just the status code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.