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

# smsTemplate

> Fetch a single SMS template by its id. Ids from earlier versions of the Redo API are also accepted.

**Required scopes:** [`marketing_templates_read`](/docs/api-reference/v3/reference/scopes#scope-marketing_templates_read)

## Arguments

<ResponseField name="id" type="ID!" required>
  The template's `id`, or its `legacyId` from an earlier version of the Redo API.
</ResponseField>

## Returns

<ResponseField name="smsTemplate" type={<a href="/docs/api-reference/v3/reference/marketing/sms-template">SmsTemplate</a>}>
  The content of an SMS, as the merchant authored it.

  <Expandable title="fields" lazyRender>
    <ResponseField name="autoShortenLinks" type="Boolean!" required>
      Whether links in the body are shortened at send time.
    </ResponseField>

    <ResponseField name="content" type="String!" required>
      The SMS body **as authored**, before per-recipient substitution.
    </ResponseField>

    <ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
      When the template was created.
    </ResponseField>

    <ResponseField name="id" type="ID!" required>
      The id of this template.
    </ResponseField>

    <ResponseField name="images" type={<a href="/docs/api-reference/v3/reference/marketing/sms-template-image">[SmsTemplateImage!]!</a>} required>
      Images sent with the message as MMS, in order. Dynamic product images and contact cards set in the editor are not listed.

      <Expandable title="fields" lazyRender>
        <ResponseField name="url" type="String!" required>
          The image URL.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="legacyId" type="String!" required>
      The template's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
    </ResponseField>

    <ResponseField name="name" type="String!" required>
      The merchant-facing name of the template.
    </ResponseField>

    <ResponseField name="trigger" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-trigger">MarketingTrigger!</a>} required>
      The trigger context this template is valid for. Immutable after create. UNKNOWN when the stored trigger is not modeled in this API version.
    </ResponseField>

    <ResponseField name="updatedAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
      When the template was last edited.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```graphql theme={null}
query {
  smsTemplate(id: "...") {
    autoShortenLinks
    content
    createdAt
    id
    legacyId
    name
    trigger
    updatedAt
  }
}
```


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