> ## 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.

# updateSmsTemplate

> Update an SMS template. Returns null if no owned template matches the id.

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

## Arguments

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

<ResponseField name="input" type={<a href="/docs/api-reference/v3/reference/marketing/update-sms-template-input">UpdateSmsTemplateInput!</a>} required>
  Fields to change.

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

    <ResponseField name="content" type="String">
      The SMS body as authored.
    </ResponseField>

    <ResponseField name="imageUrls" type="[String!]">
      HTTPS image URLs sent with the message as MMS, at most 2. Upload a file with `uploadMarketingImage` (channel SMS) to get one that fits carrier limits. Replaces the template's images; product images and contact cards set in the editor are kept. Pass \[] to remove all images.
    </ResponseField>

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

## Returns

<ResponseField name="updateSmsTemplate" 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}
mutation {
  updateSmsTemplate(id: "...", input: { ... }) {
    autoShortenLinks
    content
    createdAt
    id
    legacyId
    name
    trigger
    updatedAt
  }
}
```


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