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

# Create an RCS template

> Creates an RCS template. Set `type` to choose the format:

- `text_message`: text with up to 11 suggestion buttons
- `rich_card`: a single card with media, title, description and up to 4 buttons
- `carousel`: 2 to 10 cards, each with up to 4 buttons


Templates are reviewed before use. The response returns `approval_status` (`pending`, `approved` or `rejected`); send only after approval.



## OpenAPI

````yaml /cpaas-api-reference.yaml post /api/rcs/template/create
openapi: 3.1.0
info:
  title: CPaaS+ Messaging API
  version: 1.0.0
  description: >-
    Unified REST API for sending and managing customer communications across
    **SMS**, **WhatsApp**, **Email**, **RCS** and **Flow Builder**. It also
    includes the **WhatsApp Wrapper API**, a simplified layer over Meta's
    WhatsApp Cloud API for sending free-form message types (text, media,
    interactive and more).


    All APIs are HTTP-based, use JSON and are secured with bearer-token
    authentication. Generate a token in the CPaaS+ portal (API tab, then **Add
    new Token**) and send it as `Authorization: Bearer <token>` on every
    request.


    A `200` response means the request was **accepted**, not that the message
    was delivered. Use the status endpoints for delivery results.
servers:
  - url: '{baseUrl}'
    description: Your CPaaS+ API host (provided at onboarding)
    variables:
      baseUrl:
        default: https://api.yourcpaas.com
        description: Host of your CPaaS+ web portal account, without a trailing slash.
security:
  - bearerAuth: []
tags:
  - name: SMS
    description: >-
      Send SMS using portal campaigns, approved templates, or open text, and
      check delivery status.
  - name: SMS Webhooks
    description: SMS delivery report callback payloads.
  - name: WhatsApp Messaging
    description: Send WhatsApp template messages and manage order status and refunds.
  - name: WhatsApp Wrapper API
    description: >-
      Send text, media, contact, location, interactive and other WhatsApp
      message types through the single Wrapper endpoint.
  - name: WhatsApp User Management
    description: >-
      Block, unblock, bulk-import and sync blocked WhatsApp users for a WABA
      number.
  - name: Email
    description: Send template-based or open-text email and check delivery status.
  - name: RCS Templates
    description: Create RCS templates (text with buttons, rich card, carousel).
  - name: RCS Messaging
    description: Send RCS messages and check message status.
  - name: RCS Webhooks
    description: Customer-facing RCS webhook callback payloads and event schemas.
  - name: Flow Builder
    description: Create, manage, publish and trigger Flow Builder journeys.
paths:
  /api/rcs/template/create:
    post:
      tags:
        - RCS Templates
      summary: Create an RCS template
      description: >-
        Creates an RCS template. Set `type` to choose the format:


        - `text_message`: text with up to 11 suggestion buttons

        - `rich_card`: a single card with media, title, description and up to 4
        buttons

        - `carousel`: 2 to 10 cards, each with up to 4 buttons



        Templates are reviewed before use. The response returns
        `approval_status` (`pending`, `approved` or `rejected`); send only after
        approval.
      operationId: createRcsTemplate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/RcsTemplateText'
                - $ref: '#/components/schemas/RcsTemplateRichCard'
                - $ref: '#/components/schemas/RcsTemplateCarousel'
              discriminator:
                propertyName: type
                mapping:
                  text_message: '#/components/schemas/RcsTemplateText'
                  rich_card: '#/components/schemas/RcsTemplateRichCard'
                  carousel: '#/components/schemas/RcsTemplateCarousel'
            examples:
              textWithButtons:
                summary: Plain text + buttons
                value:
                  name: order_ready
                  agent_id: your-agent-id
                  type: text_message
                  textMessageContent: Hello {{name}}, your order {{order_id}} is ready for pickup!
                  suggestions:
                    - suggestionType: reply
                      displayText: Opt out
                      postback: opt_out
                    - suggestionType: url_action
                      displayText: View Details
                      url: https://example.com/order/{{order_id}}
                      postback: view_details
                    - suggestionType: dialer_action
                      displayText: Call Support
                      phoneNumber: +91XXXXXXXXXX
                      postback: call_support
              richCard:
                summary: Media + buttons
                value:
                  name: promo_card
                  agent_id: your-agent-id
                  type: rich_card
                  orientation: VERTICAL
                  height: SHORT_HEIGHT
                  standAlone:
                    cardTitle: Festive Offer
                    cardDescription: Flat 20% off on all orders this week.
                    mediaUrl: https://example.com/media/offer.jpg
                    suggestions:
                      - suggestionType: url_action
                        displayText: Shop Now
                        url: https://example.com/shop
                        postback: shop_now
              carousel:
                summary: Carousel
                value:
                  name: catalogue_carousel
                  agent_id: your-agent-id
                  type: carousel
                  width: MEDIUM_WIDTH
                  height: MEDIUM_HEIGHT
                  carouselList:
                    - cardTitle: Product A
                      cardDescription: Lightweight and durable.
                      mediaUrl: https://example.com/media/a.jpg
                      suggestions:
                        - suggestionType: url_action
                          displayText: View
                          url: https://example.com/a
                          postback: view_a
                    - cardTitle: Product B
                      cardDescription: Our best seller.
                      mediaUrl: https://example.com/media/b.jpg
                      suggestions:
                        - suggestionType: url_action
                          displayText: View
                          url: https://example.com/b
                          postback: view_b
      responses:
        '200':
          description: Request accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RcsTemplateCreateResponse'
              example:
                status: success
                message: Template created successfully.
                data:
                  template_id: rcs-tpl-20260326-001
                  name: order_ready_v1
                  approval_status: pending
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    RcsTemplateText:
      type: object
      required:
        - name
        - agent_id
        - type
        - textMessageContent
      properties:
        name:
          type: string
          description: Template name.
        agent_id:
          type: string
          description: Your RCS agent ID.
        type:
          type: string
          const: text_message
        textMessageContent:
          type: string
          description: >-
            Message text. Define variables with double braces, for example
            `{{name}}`.
        suggestions:
          type: array
          maxItems: 11
          items:
            $ref: '#/components/schemas/RcsTemplateSuggestion'
    RcsTemplateRichCard:
      type: object
      required:
        - name
        - agent_id
        - type
        - orientation
        - standAlone
      properties:
        name:
          type: string
        agent_id:
          type: string
        type:
          type: string
          const: rich_card
        orientation:
          type: string
          enum:
            - HORIZONTAL
            - VERTICAL
        height:
          type: string
          enum:
            - SHORT_HEIGHT
            - MEDIUM_HEIGHT
            - TALL_HEIGHT
          description: Card height. Applies when orientation is Vertical.
        standAlone:
          $ref: '#/components/schemas/RcsTemplateCard'
    RcsTemplateCarousel:
      type: object
      required:
        - name
        - agent_id
        - type
        - carouselList
      properties:
        name:
          type: string
        agent_id:
          type: string
        type:
          type: string
          const: carousel
        width:
          type: string
          enum:
            - SMALL_WIDTH
            - MEDIUM_WIDTH
        height:
          type: string
          enum:
            - SHORT_HEIGHT
            - MEDIUM_HEIGHT
        carouselList:
          type: array
          minItems: 2
          maxItems: 10
          items:
            $ref: '#/components/schemas/RcsTemplateCard'
    RcsTemplateCreateResponse:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        data:
          type: object
          properties:
            template_id:
              type: string
              description: Internal template ID.
            name:
              type: string
            approval_status:
              type: string
              description: Review status. Send only after the template is approved.
              enum:
                - pending
                - approved
                - rejected
    RcsTemplateSuggestion:
      type: object
      required:
        - suggestionType
        - displayText
      properties:
        suggestionType:
          type: string
          enum:
            - reply
            - url_action
            - dialer_action
          description: >-
            `reply` quick reply, `url_action` opens a URL, `dialer_action` opens
            the dialer.
        displayText:
          type: string
          maxLength: 25
          description: Button label (max 25 characters).
        postback:
          type: string
          description: Optional callback value returned when the button is tapped.
        url:
          type: string
          description: Target URL for `url_action`. Variables are allowed.
        phoneNumber:
          type: string
          description: Phone number for `dialer_action`.
    RcsTemplateCard:
      type: object
      properties:
        cardTitle:
          type: string
          maxLength: 200
        cardDescription:
          type: string
          maxLength: 2000
        mediaUrl:
          type: string
          format: uri
        suggestions:
          type: array
          maxItems: 4
          items:
            $ref: '#/components/schemas/RcsTemplateSuggestion'
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          description: '`error` on platform errors.'
        error_code:
          type: integer
          description: HTTP-style error code.
        error_message:
          type: string
          description: Human-readable error.
        message:
          type: string
          description: Human-readable error (validation style).
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Field-level validation errors keyed by field name.
      description: >-
        Error body. The exact fields present depend on the failure: validation
        failures return `message` and `errors`; platform failures return
        `status`, `error_code` and `error_message`.
  responses:
    BadRequest:
      description: 'Bad request: invalid JSON or missing fields.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, invalid or expired bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        Forbidden: the request came from a restricted (non-allow-listed) IP
        address.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnprocessableEntity:
      description: >-
        Unprocessable entity: invalid numbers or fields, or invalid message
        content.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: >-
        Internal server error: a server-side issue. Retry later or contact
        support.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token issued for your account. Send as `Authorization: Bearer
        <token>`.

````

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