> ## 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.

# Edit template

> Updates an existing template identified by its Meta template ID.



## OpenAPI

````yaml openapi.evolution-v2.json POST /template/edit/{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/edit/{instance}:
    post:
      tags:
        - Template
      summary: Edit template
      description: Updates an existing template identified by its Meta template ID.
      operationId: post__template_edit_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:
                templateId:
                  type: string
                  description: Meta template ID to edit.
                  example: '1234567890123456'
                category:
                  type: string
                  description: 'New category: `AUTHENTICATION`, `MARKETING`, or `UTILITY`.'
                  example: UTILITY
                allowCategoryChange:
                  type: boolean
                  description: Allow Meta to reassign the category during review.
                  example: false
                ttl:
                  type: number
                  description: Time-to-live for authentication templates, in seconds.
                  example: 600
                components:
                  type: array
                  description: Replacement template component objects.
                  items:
                    type: object
                  example:
                    - type: BODY
                      text: Ola {{1}}, seu pedido {{2}} esta a caminho.
              required:
                - templateId
      responses:
        '200':
          description: Success — provider-native response body.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Native response from the WhatsApp Business (Meta) API when
                  editing an existing message template.
                properties:
                  success:
                    type: boolean
                    description: >-
                      Whether the template edit was accepted by the WhatsApp
                      Business API.
                required:
                  - success
              example:
                success: true
        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>`.

````