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

# Create template

> Creates a new message template for the instance.



## OpenAPI

````yaml openapi.evolution-v2.json POST /template/create/{instance}
openapi: 3.1.0
info:
  title: Evolution V2 Layer
  version: 1.0.0
  description: >-
    Pilot Status API Layer — Evolution V2. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-v2`. Authenticate with the
    `apikey` header (your Pilot Status `ps_` key). Instance/session endpoints
    are NOT available through the layer.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-v2
security:
  - apiKey: []
tags:
  - name: Call & Business
  - name: Chat
  - name: Group
  - name: Label
  - name: Message
  - name: Profile
  - name: Settings & Proxy
  - name: Storage (S3)
  - name: Template
paths:
  /template/create/{instance}:
    post:
      tags:
        - Template
      summary: Create template
      description: Creates a new message template for the instance.
      operationId: post__template_create_instance
      parameters:
        - name: instance
          in: path
          required: true
          schema:
            type: string
          description: The number's display name in the Pilot Status dashboard.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Unique template name (lowercase, underscores).
                  example: order_confirmation
                category:
                  type: string
                  description: >-
                    Template category: `AUTHENTICATION`, `MARKETING`, or
                    `UTILITY`.
                  example: UTILITY
                language:
                  type: string
                  description: Language/locale code (e.g. `pt_BR`, `en_US`).
                  example: pt_BR
                components:
                  type: array
                  description: Template component objects (header, body, footer, buttons).
                  items:
                    type: object
                  example:
                    - type: BODY
                      text: Ola {{1}}, seu pedido {{2}} foi confirmado.
                allowCategoryChange:
                  type: boolean
                  description: Allow Meta to reassign the category during review.
                  example: true
                webhookUrl:
                  type: string
                  description: URL notified about template status changes.
                  example: https://example.com/webhooks/template-status
              required:
                - name
                - category
                - language
                - components
      responses:
        '200':
          description: Success — provider-native response body.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The persisted template record. Evolution registers the
                  template on the WhatsApp Business (Meta) API and stores the
                  returned metadata locally, returning the saved DB row.
                properties:
                  id:
                    type: string
                    description: Internal Evolution record id (cuid).
                  templateId:
                    type: string
                    description: >-
                      Meta message template id (HSM id) returned by the WhatsApp
                      Business API.
                  name:
                    type: string
                    description: Template name.
                  template:
                    type: object
                    description: >-
                      Raw response object returned by the Meta message_templates
                      create call.
                    properties:
                      id:
                        type: string
                        description: Meta template id.
                      status:
                        type: string
                        description: >-
                          Review status of the template (e.g. PENDING, APPROVED,
                          REJECTED).
                      category:
                        type: string
                        description: >-
                          Approved/assigned category (AUTHENTICATION, MARKETING,
                          UTILITY).
                  webhookUrl:
                    type:
                      - string
                      - 'null'
                    description: Optional webhook URL associated with the template.
                  createdAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: Creation timestamp.
                  updatedAt:
                    type: string
                    format: date-time
                    description: Last update timestamp.
                  instanceId:
                    type: string
                    description: Id of the instance that owns the template.
                required:
                  - id
                  - templateId
                  - name
                  - template
                  - instanceId
              example:
                id: clv8k2p9x0001qz9m3n4b5c6d
                templateId: '1234567890123456'
                name: order_confirmation
                template:
                  id: '1234567890123456'
                  status: PENDING
                  category: UTILITY
                webhookUrl: https://example.com/webhooks/templates
                createdAt: '2026-07-10T12:34:56.000Z'
                updatedAt: '2026-07-10T12:34:56.000Z'
                instanceId: b1f2c3d4-e5f6-7890-ab12-cd34ef567890
        default:
          description: Error — provider or layer error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                  response:
                    type: object
              example:
                status: 400
                error: Bad Request
                message: Invalid payload
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        Your Pilot Status API key (ps_...). Evolution GO also accepts
        `Authorization: Bearer <key>`.

````