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

# Create a template

> Registers a message template on an RCS sender with the RCS platform and returns it with status `pending`.



## OpenAPI

````yaml openapi-sms.yaml POST /senders/{senderId}/templates
openapi: 3.0.3
info:
  title: Vobiz Messaging API
  description: >
    Send and receive SMS, MMS and RCS messages, buy messaging numbers, register
    for

    US 10DLC and toll-free, run broadcasts, manage conversations, opt-outs and
    webhooks.


    **Base URL:** `https://api.vobiz.ai/api/v1/sms`


    **Authentication:** every request needs the `X-Auth-ID` and `X-Auth-Token`
    headers.

    The account is taken from your credentials; you never put an account ID in a
    path or body.

    Field names in this API are camelCase.
  version: '1.0'
  contact:
    email: support@vobiz.ai
    url: https://vobiz.ai
servers:
  - url: https://api.vobiz.ai/api/v1/sms
    description: Production
security:
  - AuthID: []
    AuthToken: []
tags:
  - name: Messages
    description: Send messages and inspect their delivery state.
  - name: Numbers
    description: >-
      Messaging-capable numbers on your account, inventory search, purchase and
      release.
  - name: Coverage
    description: Where you can send, per country.
  - name: Conversations
    description: Two-way threads between one of your numbers and a contact.
  - name: Opt-outs
    description: Numbers that must not receive messages on a channel.
  - name: Webhooks
    description: Subscriptions that deliver message and broadcast events to your server.
  - name: Broadcasts
    description: Bulk sends from an uploaded recipient list.
  - name: RCS Senders
    description: RCS sender (agent) identities and their message templates.
  - name: 10DLC Brands
    description: US 10DLC brand registration.
  - name: 10DLC Campaigns
    description: US 10DLC campaigns, toll-free verification and supporting documents.
paths:
  /senders/{senderId}/templates:
    parameters:
      - name: senderId
        in: path
        required: true
        description: >-
          The `id` (UUID) of the RCS sender that owns the templates. An unknown
          sender returns `sender not found`.
        schema:
          type: string
          format: uuid
        example: 5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b
    post:
      tags:
        - RCS Senders
      summary: Create a template
      description: >-
        Registers a message template on an RCS sender with the RCS platform and
        returns it with status `pending`. `templateName`, `type` and `content`
        are passed to the platform unchanged, so use the template types and
        content shapes the RCS platform defines. Call `GET
        /senders/{senderId}/templates/{templateName}/status` to follow approval.
        An unknown sender or a platform rejection returns `400`.
      operationId: create-template
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTemplateRequest'
            example:
              templateName: order-shipped
              type: TEXT
              content:
                text: Your order {{orderId}} has shipped and arrives on {{eta}}.
      responses:
        '201':
          description: The new template in status `pending`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
              example:
                id: c2e4a6b8-1d3f-4a5c-9e7b-6f8d0a2c4e61
                senderId: 7a1c3e5f-9b2d-4c6e-8f0a-1b3d5e7f9a21
                accountId: MA_XXXXXXXX
                provider: YOUR_ROUTING_IDENTIFIER
                templateName: order-shipped
                type: TEXT
                status: pending
                content:
                  text: Your order {{orderId}} has shipped and arrives on {{eta}}.
                createdAt: '2026-10-12T10:30:00Z'
                updatedAt: '2026-10-12T10:30:00Z'
        '400':
          description: >-
            The body is invalid, the sender does not exist on your account, or
            the RCS platform rejected the template.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                body:
                  value:
                    error: invalid request body
                notFound:
                  value:
                    error: sender not found
                platform:
                  value:
                    error: 'provider create template failed: <description>'
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-codeSamples:
        - lang: typescript
          label: Node SDK
          source: >
            import { VobizClient } from "@vobiz/sdk";


            const client = new VobizClient({ apiKey: "MA_XXXXXXXX", authToken:
            "YOUR_AUTH_TOKEN" });


            await client.sms.rcsSenders.createTemplate({
                senderId: "5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b",
                templateName: "order-shipped",
                type: "TEXT",
                content: {
                    "text": "Your order {{orderId}} has shipped and arrives on {{eta}}."
                }
            })
        - lang: python
          label: Python SDK
          source: |
            from vobiz import Vobiz

            client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")

            client.sms.rcs_senders.create_template(
                sender_id="5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b",
                template_name="order-shipped",
                type="TEXT",
                content={
                    "text": "Your order {{orderId}} has shipped and arrives on {{eta}}."
                },
            )
        - lang: go
          label: Go SDK
          source: |
            import (
                "context"

                vobiz "github.com/vobiz-ai/Vobiz-Go-SDK"
                "github.com/vobiz-ai/Vobiz-Go-SDK/client"
                "github.com/vobiz-ai/Vobiz-Go-SDK/option"
                "github.com/vobiz-ai/Vobiz-Go-SDK/sms"
            )

            c := client.NewClient(
                option.WithAPIKey("MA_XXXXXXXX"),
                option.WithAuthToken("YOUR_AUTH_TOKEN"),
            )

            request := &sms.CreateTemplateRequest{
                    SenderID: "5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b",
                    TemplateName: "order-shipped",
                    Type: "TEXT",
                    Content: map[string]any{
                        "text": "Your order {{orderId}} has shipped and arrives on {{eta}}.",
                    },
                }
            c.Sms.RcsSenders.CreateTemplate(
                    context.TODO(),
                    request,
                )
        - lang: java
          label: Java SDK
          source: |
            import com.vobiz.api.VobizApiClient;

            VobizApiClient client = VobizApiClient
                .builder()
                .apiKey("MA_XXXXXXXX")
                .authToken("YOUR_AUTH_TOKEN")
                .build();

            client.sms().rcsSenders().createTemplate(
                "5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b",
                CreateTemplateRequest
                    .builder()
                    .templateName("order-shipped")
                    .type("TEXT")
                    .content(
                        new HashMap<String, Object>() {{
                            put("text", "Your order {{orderId}} has shipped and arrives on {{eta}}.");
                        }}
                    )
                    .build()
            );
        - lang: ruby
          label: Ruby SDK
          source: >
            require 'vobiz'


            client = Vobiz::Client.new(api_key: 'MA_XXXXXXXX', auth_token:
            'YOUR_AUTH_TOKEN')


            client.sms.rcs_senders.create_template(
              sender_id: "5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b",
              template_name: "order-shipped",
              type: "TEXT",
              content: {}
            )
        - lang: csharp
          label: C# SDK
          source: |
            using Vobiz;
            using Vobiz.Sms;

            var client = new VobizApiClient("YOUR_AUTH_TOKEN", "MA_XXXXXXXX");

            await client.Sms.RcsSenders.CreateTemplateAsync(
                new CreateTemplateRequest
                {
                    SenderId = "5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b",
                    TemplateName = "order-shipped",
                    Type = "TEXT",
                    Content = new Dictionary<string, object?>()
                    {
                        { "text", "Your order {{orderId}} has shipped and arrives on {{eta}}." },
                    },
                }
            );
        - lang: php
          label: PHP SDK
          source: >
            <?php


            require 'vendor/autoload.php';


            use Vobiz\VobizClient;


            $client = new VobizClient(apiKey: 'MA_XXXXXXXX', authToken:
            'YOUR_AUTH_TOKEN');


            $client->sms->rcsSenders->createTemplate(
                '5d7f9b1c-3e5a-4c7e-9f1b-3d5f7a9c1e3b',
                new CreateTemplateRequest([
                    'templateName' => 'order-shipped',
                    'type' => 'TEXT',
                    'content' => [
                        'text' => "Your order {{orderId}} has shipped and arrives on {{eta}}.",
                    ],
                ]),
            );
components:
  schemas:
    CreateTemplateRequest:
      type: object
      required:
        - templateName
        - type
        - content
      properties:
        templateName:
          type: string
          description: >-
            Unique name for the template on this sender. You use it in the path
            of every template endpoint.
          example: order-shipped
        type:
          type: string
          description: >-
            Template type as defined by the RCS platform. It decides which
            `content` shape the platform expects.
        content:
          type: object
          description: >-
            Template content as a JSON object in the shape the RCS platform
            defines for the chosen `type`. Stored and returned exactly as you
            submit it.
          additionalProperties: true
      description: >-
        A message template to register on an RCS sender. All three fields are
        required and are passed to the RCS platform unchanged.
    Template:
      type: object
      description: >-
        A message template registered on an RCS sender, with the approval status
        reported by the RCS platform.
      properties:
        id:
          type: string
          format: uuid
          example: c2e4a6b8-1d3f-4a5c-9e7b-6f8d0a2c4e61
          description: >-
            Unique identifier of the template on Vobiz (UUID). Template
            endpoints address templates by `templateName` instead.
        senderId:
          type: string
          format: uuid
          description: The `id` of the RCS sender the template belongs to.
          example: 7a1c3e5f-9b2d-4c6e-8f0a-1b3d5e7f9a21
        accountId:
          type: string
          example: MA_XXXXXXXX
          description: Your Vobiz account ID (`MA_...`) that owns the template.
        provider:
          type: string
          description: Internal routing identifier; do not rely on its value.
          example: YOUR_ROUTING_IDENTIFIER
        templateName:
          type: string
          description: >-
            Unique name of the template on its sender. Used in the path of every
            template endpoint.
          example: order-shipped
        type:
          type: string
          description: Template type as defined by the RCS platform.
        status:
          type: string
          default: pending
          description: >-
            Approval status reported by the RCS platform, stored on your
            account. `pending` until the platform reports otherwise. Call `GET
            /senders/{senderId}/templates/{templateName}/status` to refresh it.
          example: pending
        content:
          type: object
          description: The template content exactly as you submitted it.
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
          example: '2026-10-12T10:30:00Z'
          description: When the template was created on your account (ISO 8601, UTC).
        updatedAt:
          type: string
          format: date-time
          example: '2026-10-12T10:30:00Z'
          description: >-
            When the template last changed, including status refreshes (ISO
            8601, UTC).
    Error:
      type: object
      description: >-
        The body of every error response: a flat object with one `error` string
        that explains what went wrong. Use the HTTP status code to decide how to
        handle the error, and log `error` for diagnosis.
      required:
        - error
      properties:
        error:
          type: string
          example: 'recipient has opted out: +14155550123'
          description: >-
            Human-readable explanation of the error, for example `phoneNumber is
            required` or `recipient has opted out: +14155550123`. Branch on the
            HTTP status code rather than on this text.
  responses:
    Unauthorized:
      description: Missing or invalid `X-Auth-ID` / `X-Auth-Token`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: missing or invalid credentials
  securitySchemes:
    AuthID:
      type: apiKey
      in: header
      name: X-Auth-ID
      description: Your Vobiz account Auth ID (`MA_XXXXXXXX`).
    AuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Your Vobiz account Auth Token.

````

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