---
title: "Create an RCS template"
method: POST
path: "/rcs/template"
tags: ["RCS Templates"]
---

# Create an RCS template

`POST /rcs/template`

## Request

- Base URL: `https://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX`
- URL: `https://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX/rcs/template`
- Auth: none declared. Required headers: `Content-Type`, `api-key`

## Headers

- `Content-Type` 'application/json', required
- `api-key` string, required

## Request body

- CreateTemplateRequest
  - `agent_number` string, required: Agent Number of the agent under which the template is created.
  - `template_type` '1' | '3' | '4' | '5', required: Template type. 1 is Text, 3 is File, 4 is Rich Card Standalone, and 5 is Rich Card Carousel.
  - `template_name` string, required: Unique template name. Maximum 20 characters including alphanumeric characters and underscore. Space is not allowed.
  - `text` string: Text message to send to end users. Maximum 2000 characters. Conditional when template_type is 1.
  - `status` 'DRAFT' | 'CREATED' | 'SUBMITTEDFORAPPROVAL' | 'ACTIVE' | 'FAILED' | 'DELETED', required: Template status. DRAFT can be edited. CREATED can be edited until ACTIVE. SUBMITTEDFORAPPROVAL indicates submission to the carrier. ACTIVE templates can be used for messaging and cannot be edited. FAILED and DELETED are documented workflow states.
  - `contentMessage` ContentMessage: Interactive content of the RCS message.
    - `suggestions` Suggestion[]: Suggestion chip list.
      - `action` Action
        - `text` string: Text displayed for the action.
        - `postback_data` string: Information received after the action is completed.
        - `shareLocationAction` object: Action to share the user's location in latitude and longitude.
        - `dial_action` DialAction
          - `phone_number` string: Phone number using which end users can contact you.
        - `open_url_action` OpenUrlAction
          - `url` string, uri: URL to open.
          - `application` string: Application in which the URL is opened.
          - `webview_view_mode` string: Webview display mode.
      - `reply` Reply
        - `text` string: Reply text.
        - `postback_data` string: Postback data.
        - `button_id` string: Button identifier.
  - `file` File
    - `file_url` string, uri: URL of the file to be sent.
    - `thumbnail_url` string, uri: URL of the thumbnail for the file.
    - `content_description` string: Description for the URL file.
    - `force_refresh` boolean: Indicates whether the media should be force refreshed.
  - `rich_card_standalone` RichCardStandalone
    - `card_orientation` 'VERTICAL' | 'HORIZONTAL': Card orientation. Can be VERTICAL or HORIZONTAL.
    - `thumbnail_image_alignment` 'LEFT' | 'RIGHT': Card alignment. Can be LEFT or RIGHT.
    - `content` RichCardContent
      - `title` string: Title of the card.
      - `description` string: Description of the card relevant to the title.
      - `media` Media
        - `height` 'SHORT' | 'MEDIUM' | 'TALL': Height of media file. Can be SHORT, MEDIUM, or TALL.
        - `file` File
          - `file_url` string, uri: URL of the file to be sent.
          - `thumbnail_url` string, uri: URL of the thumbnail for the file.
          - `content_description` string: Description for the URL file.
          - `force_refresh` boolean: Indicates whether the media should be force refreshed.
      - `suggestions` Suggestion[]: Suggestion chip list.
        - `action` Action
          - `text` string: Text displayed for the action.
          - `postback_data` string: Information received after the action is completed.
          - `shareLocationAction` object: Action to share the user's location in latitude and longitude.
          - `dial_action` DialAction
            - `phone_number` string: Phone number using which end users can contact you.
          - `open_url_action` OpenUrlAction
            - `url` string, uri: URL to open.
            - `application` string: Application in which the URL is opened.
            - `webview_view_mode` string: Webview display mode.
        - `reply` Reply
          - `text` string: Reply text.
          - `postback_data` string: Postback data.
          - `button_id` string: Button identifier.
  - `rich_card_carousel` RichCardCarousel
    - `card_width` 'SMALL' | 'MEDIUM': Width of cards in the carousel.
    - `card_contents` RichCardCarouselContent[]: List of cards in the carousel.
      - `title` string: Title of the card.
      - `description` string: Description of the card.
      - `media` Media
        - `height` 'SHORT' | 'MEDIUM' | 'TALL': Height of media file. Can be SHORT, MEDIUM, or TALL.
        - `file` File
          - `file_url` string, uri: URL of the file to be sent.
          - `thumbnail_url` string, uri: URL of the thumbnail for the file.
          - `content_description` string: Description for the URL file.
          - `force_refresh` boolean: Indicates whether the media should be force refreshed.
      - `suggestions` CarouselSuggestion[]: Suggestions associated with the card.
        - `reply` Reply
          - `text` string: Reply text.
          - `postback_data` string: Postback data.
          - `button_id` string: Button identifier.

## Response `200`

RCS Template created successfully.

- CreateTemplateResponse
  - `code` string
  - `message` string
  - `data` CreateTemplateResponseData
    - `template_id` string: UUID string for the template.
    - `created_date` integer: Date/time when the template was created.
    - `agent_number` string: Agent number.
    - `template_type` '1' | '3' | '4' | '5': Template type. 1 is Text, 3 is File, 4 is Rich Card Standalone, and 5 is Rich Card Carousel.
    - `template_name` string: Unique template name.
    - `text` string: Template text when applicable.
    - `status` 'DRAFT' | 'CREATED' | 'SUBMITTEDFORAPPROVAL' | 'ACTIVE' | 'FAILED' | 'DELETED': Template status. DRAFT can be edited. CREATED can be edited until ACTIVE. SUBMITTEDFORAPPROVAL indicates submission to the carrier. ACTIVE templates can be used for messaging and cannot be edited. FAILED and DELETED are documented workflow states.
    - `template_number` string: Unique identification number for the template.
    - `placeholders` string: String containing the dynamic variables.
    - `regions` string[]: Region for which the template has been created.
    - `contentMessage` ContentMessage: Interactive content of the RCS message.
      - `suggestions` Suggestion[]: Suggestion chip list.
        - `action` Action
          - `text` string: Text displayed for the action.
          - `postback_data` string: Information received after the action is completed.
          - `shareLocationAction` object: Action to share the user's location in latitude and longitude.
          - `dial_action` DialAction
            - `phone_number` string: Phone number using which end users can contact you.
          - `open_url_action` OpenUrlAction
            - `url` string, uri: URL to open.
            - `application` string: Application in which the URL is opened.
            - `webview_view_mode` string: Webview display mode.
        - `reply` Reply
          - `text` string: Reply text.
          - `postback_data` string: Postback data.
          - `button_id` string: Button identifier.
    - `file` File
      - `file_url` string, uri: URL of the file to be sent.
      - `thumbnail_url` string, uri: URL of the thumbnail for the file.
      - `content_description` string: Description for the URL file.
      - `force_refresh` boolean: Indicates whether the media should be force refreshed.
    - `rich_card_standalone` RichCardStandalone
      - `card_orientation` 'VERTICAL' | 'HORIZONTAL': Card orientation. Can be VERTICAL or HORIZONTAL.
      - `thumbnail_image_alignment` 'LEFT' | 'RIGHT': Card alignment. Can be LEFT or RIGHT.
      - `content` RichCardContent
        - `title` string: Title of the card.
        - `description` string: Description of the card relevant to the title.
        - `media` Media
          - `height` 'SHORT' | 'MEDIUM' | 'TALL': Height of media file. Can be SHORT, MEDIUM, or TALL.
          - `file` File
            - `file_url` string, uri: URL of the file to be sent.
            - `thumbnail_url` string, uri: URL of the thumbnail for the file.
            - `content_description` string: Description for the URL file.
            - `force_refresh` boolean: Indicates whether the media should be force refreshed.
        - `suggestions` Suggestion[]: Suggestion chip list.
          - `action` Action
            - `text` string: Text displayed for the action.
            - `postback_data` string: Information received after the action is completed.
            - `shareLocationAction` object: Action to share the user's location in latitude and longitude.
            - `dial_action` DialAction
              - …
            - `open_url_action` OpenUrlAction
              - …
          - `reply` Reply
            - `text` string: Reply text.
            - `postback_data` string: Postback data.
            - `button_id` string: Button identifier.
    - `rich_card_carousel` RichCardCarousel
      - `card_width` 'SMALL' | 'MEDIUM': Width of cards in the carousel.
      - `card_contents` RichCardCarouselContent[]: List of cards in the carousel.
        - `title` string: Title of the card.
        - `description` string: Description of the card.
        - `media` Media
          - `height` 'SHORT' | 'MEDIUM' | 'TALL': Height of media file. Can be SHORT, MEDIUM, or TALL.
          - `file` File
            - `file_url` string, uri: URL of the file to be sent.
            - `thumbnail_url` string, uri: URL of the thumbnail for the file.
            - `content_description` string: Description for the URL file.
            - `force_refresh` boolean: Indicates whether the media should be force refreshed.
        - `suggestions` CarouselSuggestion[]: Suggestions associated with the card.
          - `reply` Reply
            - `text` string: Reply text.
            - `postback_data` string: Postback data.
            - `button_id` string: Button identifier.
  - `error` object

## Other responses

- `400`: Bad request.
- `405`: Method not allowed.
- `500`: Internal Gateway Error.

---

[API](https://skmtc.dev/kaleyra/apis/kaleyra-rcs-template-api.md) - [All operations](https://skmtc.dev/kaleyra/apis/kaleyra-rcs-template-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kaleyra/apis/kaleyra-rcs-template-api/revisions/996348f423f0?raw)
