---
title: "Update a template"
method: PUT
path: "/v3/templates/{id}"
tags: ["Templates"]
---

# Update a template

`PUT /v3/templates/{id}`

Updates an existing template's name, category, language, definition, or submits it for review.

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string
- `x-profile-id` string, uuid

## Request body

- SentDmServicesEndpointsCustomerAPIv3RequestsUpdateTemplateRequest — Request to update an existing template
  - `sandbox` boolean — Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution
  - `name` string, nullable — Template display name
  - `category` string, nullable — Template category: MARKETING, UTILITY, AUTHENTICATION
  - `language` string, nullable — Template language code (e.g., en_US)
  - `definition` SentDmServicesCommonEntitiesTemplateDefinition — Complete definition of a message template including header, body, footer, and buttons
    - `header` SentDmServicesCommonEntitiesTemplateHeader — Header section of a message template
      - `type` string, nullable — The type of header (e.g., "text", "image", "video", "document")
      - `template` string, required — The header template text with optional variable placeholders (e.g., "Welcome to {{0:variable}}")
      - `variables` SentDmServicesCommonEntitiesTemplateVariable[], nullable — List of variables used in the header template
        - `id` integer
        - `name` string, required
        - `type` string, required
        - `props` SentDmServicesCommonEntitiesTemplateVariableProps, required
          - `variableType` string, required
          - `sample` string, required
          - `regex` string, nullable
          - `url` string, required
          - `shortUrl` string, nullable
          - `alt` string, nullable
          - `mediaType` string, required
    - `body` SentDmServicesCommonEntitiesTemplateBody, required — Body section of a message template with channel-specific content
      - `multiChannel` SentDmServicesCommonEntitiesTemplateBodyContent
        - `type` string, nullable
        - `template` string, required
        - `variables` SentDmServicesCommonEntitiesTemplateVariable[], nullable
          - `id` integer
          - `name` string, required
          - `type` string, required
          - `props` SentDmServicesCommonEntitiesTemplateVariableProps, required
            - `variableType` string, required
            - `sample` string, required
            - `regex` string, nullable
            - `url` string, required
            - `shortUrl` string, nullable
            - `alt` string, nullable
            - `mediaType` string, required
      - `sms` SentDmServicesCommonEntitiesTemplateBodyContent
        - `type` string, nullable
        - `template` string, required
        - `variables` SentDmServicesCommonEntitiesTemplateVariable[], nullable
          - `id` integer
          - `name` string, required
          - `type` string, required
          - `props` SentDmServicesCommonEntitiesTemplateVariableProps, required
            - `variableType` string, required
            - `sample` string, required
            - `regex` string, nullable
            - `url` string, required
            - `shortUrl` string, nullable
            - `alt` string, nullable
            - `mediaType` string, required
      - `whatsapp` SentDmServicesCommonEntitiesTemplateBodyContent
        - `type` string, nullable
        - `template` string, required
        - `variables` SentDmServicesCommonEntitiesTemplateVariable[], nullable
          - `id` integer
          - `name` string, required
          - `type` string, required
          - `props` SentDmServicesCommonEntitiesTemplateVariableProps, required
            - `variableType` string, required
            - `sample` string, required
            - `regex` string, nullable
            - `url` string, required
            - `shortUrl` string, nullable
            - `alt` string, nullable
            - `mediaType` string, required
      - `rcs` SentDmServicesCommonEntitiesTemplateBodyContent
        - `type` string, nullable
        - `template` string, required
        - `variables` SentDmServicesCommonEntitiesTemplateVariable[], nullable
          - `id` integer
          - `name` string, required
          - `type` string, required
          - `props` SentDmServicesCommonEntitiesTemplateVariableProps, required
            - `variableType` string, required
            - `sample` string, required
            - `regex` string, nullable
            - `url` string, required
            - `shortUrl` string, nullable
            - `alt` string, nullable
            - `mediaType` string, required
    - `footer` SentDmServicesCommonEntitiesTemplateFooter — Footer section of a message template
      - `type` string, nullable — The type of footer (typically "text")
      - `template` string, required — The footer template text with optional variable placeholders
      - `variables` SentDmServicesCommonEntitiesTemplateVariable[], nullable — List of variables used in the footer template
        - `id` integer
        - `name` string, required
        - `type` string, required
        - `props` SentDmServicesCommonEntitiesTemplateVariableProps, required
          - `variableType` string, required
          - `sample` string, required
          - `regex` string, nullable
          - `url` string, required
          - `shortUrl` string, nullable
          - `alt` string, nullable
          - `mediaType` string, required
    - `buttons` SentDmServicesCommonEntitiesTemplateButton[], nullable — Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
      - `id` integer — The unique identifier of the button (1-based index)
      - `type` string, required — The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
      - `props` SentDmServicesCommonEntitiesTemplateButtonProps, required
        - `text` string, required
        - `quickReplyType` string, required
        - `urlType` string, required
        - `url` string, required
        - `variables` SentDmServicesCommonEntitiesTemplateVariable[], required — Variables embedded in a dynamic URL button (only when UrlType = dynamic). Count is capped by TemplateContentLimits.MaxUrlButtonVariables; the placeholder must appear at the end of Url (validated in TemplateDefinitionValidator).
          - `id` integer
          - `name` string, required
          - `type` string, required
          - `props` SentDmServicesCommonEntitiesTemplateVariableProps, required
            - `variableType` string, required
            - `sample` string, required
            - `regex` string, nullable
            - `url` string, required
            - `shortUrl` string, nullable
            - `alt` string, nullable
            - `mediaType` string, required
        - `activeFor` integer, required
        - `countryCode` string, required
        - `phoneNumber` string, required
        - `offerCode` string, required
        - `otpType` string, nullable
        - `autofillText` string, nullable
        - `packageName` string, nullable
        - `signatureHash` string, nullable
    - `definitionVersion` string, nullable — The version of the template definition format
    - `authenticationConfig` SentDmServicesCommonEntitiesAuthenticationConfig — Configuration for AUTHENTICATION category templates
      - `addSecurityRecommendation` boolean — Whether to add the security recommendation text: "For your security, do not share this code."
      - `codeExpirationMinutes` integer, nullable — Code expiration time in minutes (1-90). If set, adds footer: "This code expires in X minutes."
  - `submit_for_review` boolean — Whether to submit the template for review after updating (default: false)

## Response `200`

Template updated successfully

- SentDmServicesEndpointsCustomerAPIv3ResponsesApiResponseOfTemplateResponse — Standard API response envelope for all v3 endpoints
  - `success` boolean — Indicates whether the request was successful
  - `data` SentDmServicesEndpointsCustomerAPIv3ResponsesTemplateResponse — Template response for v3 API
    - `id` string, uuid — Unique template identifier
    - `name` string — Template display name
    - `category` string — Template category: MARKETING, UTILITY, AUTHENTICATION
    - `language` string — Template language code (e.g., en_US)
    - `status` string — Template status: APPROVED, PENDING, REJECTED
    - `channels` string[], nullable — Supported channels: sms, whatsapp
    - `variables` string[], nullable — Template variables for personalization
    - `created_at` string, date-time — When the template was created
    - `updated_at` string, date-time, nullable — When the template was last updated
    - `is_published` boolean — Whether the template is published and active
  - `error` SentDmServicesEndpointsCustomerAPIv3ResponsesApiError — Error information
    - `code` string — Machine-readable error code (e.g., "RESOURCE_001")
    - `message` string — Human-readable error message
    - `details` object, nullable — Additional validation error details (field-level errors)
    - `doc_url` string, nullable — URL to documentation about this error
  - `meta` SentDmServicesEndpointsCustomerAPIv3ResponsesApiMeta — Request and response metadata
    - `request_id` string — Unique identifier for this request (for tracing and support)
    - `timestamp` string, date-time — Server timestamp when the response was generated
    - `version` string — API version used for this request

## Other responses

- `400` — Invalid request parameters
- `401` — Unauthorized - Invalid API credentials
- `403` — Forbidden
- `404` — Template not found
- `500` — Internal server error

---

[API](https://skmtc.net/sentdm/apis/sent-dm-api-v3.md) · [All operations](https://skmtc.net/sentdm/apis/sent-dm-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sentdm/sent-dm-api-v3/revisions/c451eca46f1b/schema)
