---
title: "Update single Template"
method: PUT
path: "/v1/templates/{id}"
tags: ["Templates"]
---

# Update single Template

`PUT /v1/templates/{id}`

## Request body

- TemplatePutRequestWrapperDto
  - `data` union, required
    - TemplateSMSPutRequestDto
      - `name` string — Name (unique identifier) of the template
      - `text` string — Text of the template may contain variables. Maximum 1000 characters. If you want to include a URL and have it shortened (with analytics tracking), wrap it in curly braces using the following format: {url=https://dexatel.com}.
    - union
      - object
        - `name` string — Name (unique identifier) of the template. Maximum 45 characters. Only letters, numbers, and (- _) are allowed
        - `text` string — Text of the template may contain variables. Maximum 1000 characters
        - `button_text` string — When 'button_text' is provided 'button_value' is required
        - `button_value` string — When 'button_value' is provided 'button_text' is required
      - object
        - `name` string — Name (unique identifier) of the template. Maximum 45 characters. Only letters, numbers, and (- _) are allowed
        - `text` string — Text of the template may contain variables. Maximum 1000 characters. If text is present, button_text and button_value are required
        - `url` string — Will replace existing 'media_id' if any
        - `media_id` string, uuid — Will replace existing 'url' if any
        - `button_text` string — When 'button_text' is provided 'button_value' is required
        - `button_value` string — When 'button_value' is provided 'button_text' is required
      - object
        - `name` string — Name (unique identifier) of the template. Maximum 45 characters. Only letters, numbers, and (- _) are allowed
        - `text` string — Text of the template may contain variables. Maximum 1000 characters
        - `url` string — Will replace existing 'media_id' if any
        - `media_id` string, uuid — Will replace existing 'url' if any
      - object
        - `name` string — Name (unique identifier) of the template. Maximum 45 characters. Only letters, numbers, and (- _) are allowed
        - `filename` string — Filename of the document. Maximum 25 characters which contains only [a-zA-Z0-9_]
        - `url` string — Will replace existing 'media_id' if any
        - `media_id` string, uuid — Will replace existing 'url' if any
      - object
        - `name` string — Name (unique identifier) of the template. Maximum 45 characters. Only letters, numbers, and (- _) are allowed
        - `text` string — Main title text of the carousel template. Maximum 1000 characters
        - `carousel_items` object[] — Array of carousel items
          - `title` string — Title of the carousel item
          - `image_url` string, nullable — Image URL for the carousel item. Will replace existing 'media_id' if any
          - `media_id` string, uuid — Media ID for the carousel item. Will replace existing 'image_url' if any
          - `primary_button` object — Primary button of the carousel item
            - `label` string — Button label text
            - `action_url` string — URL to open when button is clicked
            - `inactive_viber_link` boolean — Whether Viber link is inactive
          - `secondary_button` object — Secondary button of the carousel item
            - `label` string — Button label text
            - `action_url` string — URL to open when button is clicked
      - object
        - `name` string — Name (unique identifier) of the template. Maximum 45 characters. Only letters, numbers, and (- _) are allowed
        - `text` string — Survey question text. Maximum 1000 characters
        - `survey_options` string[] — Array of survey option strings. Minimum 2, maximum 5 options

## Response `200`

OK

- TemplateResponseWrapperDto
  - `data` object
    - `id` string, uuid — Unique identifier of the template
    - `account_id` string, uuid — Unique identifier of the account
    - `name` string — Name (unique identifier) of the template
    - `text` string — Text of the template may contain variables. Maximum 1000 characters
    - `channel` 'SMS' | 'VIBER' | 'WHATSAPP' — Template channel. Enumeration values [SMS, VIBER, WHATSAPP]
    - `status` 'COMPLETED' | 'IN_PROCESS' | 'CANCELED' — Template status. Enumeration values [COMPLETED, IN_PROCESS, CANCELED]
    - `type` 'text' | 'image' | 'video' | 'document' | 'carousel' | 'survey' — Template type. Enumeration values [text, image, video, document, carousel, survey]
    - `url` string — Template media url for image,video or document types
    - `filename` string — Template filename for document type
    - `button_type` string — WhatsApp Template button type
    - `button_text` string — Template button text
    - `button_value` string — Template button value
    - `placeholder_count` integer — Indicates the number of attributes. Values wrapped in {}
    - `media_id` string, uuid — Template media id for image,video or document types
    - `carousel_items` object[] — Array of carousel items. Present when type is 'carousel'
      - `title` string — Title of the carousel item
      - `media_id` string, uuid — Media ID of the carousel item image
      - `image_url` string, nullable — Image URL of the carousel item
      - `primary_button` object — Primary button of the carousel item
        - `label` string — Button label text
        - `action_url` string — URL to open when button is clicked
        - `inactive_viber_link` boolean — Whether Viber link is inactive
      - `secondary_button` object — Secondary button of the carousel item
        - `label` string — Button label text
        - `action_url` string — URL to open when button is clicked
        - `inactive_viber_link` boolean — Whether Viber link is inactive
    - `survey_options` string[] — Array of survey option strings. Present when type is 'survey'. Minimum 2, maximum 5 options
    - `create_date` string, date-time — Creation date of the template in UTC, formatted as yyyy-mm-dd hh:mm:ss
    - `update_date` string, date-time — Update date of the template in UTC, formatted as yyyy-mm-dd hh:mm:ss
    - `viber_category` 'PROMOTIONAL' | 'TRANSACTIONAL' | 'OTP' — Viber template category. Enumeration values [PROMOTIONAL, TRANSACTIONAL, OTP]
    - `viber_template` object — Viber OTP/Transactional template details. Present when viber_category is OTP or TRANSACTIONAL
      - `template_id` string — Viber template ID assigned by the Viber service
      - `sender_code` string — Viber sender code
      - `status` string — Viber template registration status
      - `status_note` string — Additional status information
      - `category` string — Viber template category as returned by the Viber service
      - `service_id` integer — Viber service ID
      - `created_at` integer — Template creation timestamp (Unix epoch)
      - `params` ViberTemplateParamDto[] — Template parameter definitions
        - `name` string — Parameter name. Must contain only English letters, digits, and underscores. Maximum 50 characters
        - `type` 'TEXT' — Parameter type. Must be TEXT
      - `locales` ViberTemplateLocaleDto[] — Template locale entries
        - `lang` string — Language code. Must be one of the supported language codes
        - `template` string — Template body text. Must be between 1 and 875 characters. Must start and end with static text, not a placeholder. Must not contain consecutive placeholders. Must contain a placeholder for every defined param
      - `var_example` ViberTemplateVarExampleDto[] — Example values for template variables
        - `name` string — Variable name. Must match a defined parameter name. Maximum 50 characters
        - `example` string — Example value for the variable. Must not contain a URL, link, or email address. Maximum 100 characters
    - `wa_sender_code` string — WhatsApp sender code associated with the template
    - `wa_category` string — WhatsApp template category (e.g. MARKETING, UTILITY, AUTHENTICATION)
    - `wa_text_examples` string[] — Example values for placeholders in the template text
    - `button_url_example` string — Example value for the dynamic URL segment in a CALL_TO_ACTION button
    - `otp_expiration_seconds` integer — OTP expiration time in seconds for WhatsApp OTP templates
    - `links` object
      - `self` string — URL of the requested resource
      - `account` string — URL of the account

## Other responses

- `400` — **Bad Request:** Code Message Description 1259 'data.name' is invalid 1260 'data.text' is too long Text must be at most 1000 characters 1265 'data.url' is too long URL must be at most 2083 characters 1266 'data.url' contains invalid characters URL must be valid 1268 'data.filename' is too long Filename must be at most 512 characters 1269 'data.filename' contains invalid characters Filename must only contain \[a-zA-Z0-9\_\] characters 1273 'date.button\_value' is invalid it should be a valid phone number in case of PHONE\_CALL type, or valid URL in case of LINK type 1274 'data.button\_text' too long Button Text must be at most 20 characters 1278 File extension can be only: .bmp, .gif, .jpg, .jpeg, .png, .svg, .webp. maximum size 24 MB For Viber image template 1279 File extension can be only: .3gpp, .m4v, .mov, .mp4. maximum size is 200 MB For Viber video template 1280 File extension can be only: .txt, .doc, .docx, .dot, .dotx, .rtf, .odt, .odf, .fodt, .info.pdf, .xps, .pdax, .eps.xls, .xlsx, .xltx, .xlsm, .csv, .ods, .fods. maximum size 200 MB For Viber document template 1282 URL should start with with 'https://' and have maximum length of 1000 characters For Viber URLs 1283 Document name should be Maximum 25 characters Viber filename must be at most 25 characters 1284 Both 'data.button\_value' and 'data.button\_text' are required in case one of them specified or both of them must be removed For Viber template with buttons 1285 Text + Image combination not allowed (button is missing) For Viber image template 1287 Image and Text combination not supported by Viber For Viber image template 1289 'data.media\_id' is invalid Should be valid UUID 1293 Unable to remove 'data.text' when the template type is 'text' Text can't be removed for Viber(text) template 1294 Unable to update 'data.filename' when the template type is 'data.image' or 'data.video' Only Viber document template can have filename 1295 Either 'data.media\_id' or 'data.url' must be provided For image, video or document templates can't remove both values 1298 For 'data.type: video' only 'data.media\_id'/'data.url', 'data.name' can be updated Viber video template do not support 'button\_text', 'button\_value' and 'filename' 1299 For 'data.type: document' only 'data.filename', 'data.media\_id'/'data.url', 'data.name' can be updated Viber document template do not support 'text', 'button\_text' and 'button\_value' 1300 The combination is not supported. Possible combinations include image, text and button 1301 'data.button\_type' unknown field 1305 'data.filename' can't be removed from 'Document' template For document templates can't remove filename value
- `404` — **Not Found:** Code Message 1251 Template not found

---

[API](https://skmtc.net/dexatel/apis/verify-apis.md) · [All operations](https://skmtc.net/dexatel/apis/verify-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dexatel/verify-apis/revisions/a924257f431d/schema)
