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

# Update WhatsApp template

> Updates a WhatsApp template and resubmits it for provider approval.



## OpenAPI

````yaml /openapi.yaml patch /v1/whatsapp-templates/{id}
openapi: 3.1.0
info:
  title: Quentli REST API
  version: 1.0.0
  description: OpenAPI spec for Quentli REST endpoints.
servers:
  - url: https://api.quentli.com
    description: Production API
  - url: https://api.staging.quentli.com
    description: Staging API for production-like validation
security:
  - organizationApiKey: []
  - oauthAccessToken: []
tags:
  - name: Auth
  - name: Management
  - name: Billing
  - name: Catalog
  - name: Customers
  - name: Invoices
  - name: Payment Methods
  - name: Payment Sessions
  - name: Payments
  - name: Subscriptions
  - name: Tax Invoices
  - name: Webhooks
  - name: Messaging
paths:
  /v1/whatsapp-templates/{id}:
    patch:
      tags:
        - Messaging
      summary: Update WhatsApp template
      description: Updates a WhatsApp template and resubmits it for provider approval.
      operationId: whatsapp_templates_update
      parameters:
        - schema:
            type: string
            description: Identifier of the WhatsApp template.
          required: true
          description: Identifier of the WhatsApp template.
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWhatsappTemplateArgs'
      responses:
        '200':
          description: WhatsApp template updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappTemplatePayload'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '404':
          description: WhatsApp template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
components:
  schemas:
    UpdateWhatsappTemplateArgs:
      type: object
      properties:
        input:
          type: object
          properties:
            id:
              type: string
            data:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                category:
                  type: string
                  enum:
                    - AUTHENTICATION
                    - FREE_SERVICE
                    - MARKETING
                    - UTILITY
                language:
                  type: string
                parameterFormat:
                  type: string
                  enum:
                    - NAMED
                    - POSITIONAL
                status:
                  type: string
                  enum:
                    - APPROVED
                    - ARCHIVED
                    - DELETED
                    - DISABLED
                    - REJECTED
                    - PAUSED
                    - FLAGGED
                    - IN_APPEAL
                    - LIMIT_EXCEEDED
                    - PENDING
                    - PENDING_DELETION
                    - SUBMITTED
                    - UNKNOWN
                components:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - HEADER
                          - BODY
                          - FOOTER
                          - BUTTONS
                      text:
                        type: string
                      format:
                        anyOf:
                          - type: string
                            enum:
                              - TEXT
                              - IMAGE
                              - VIDEO
                              - DOCUMENT
                              - LOCATION
                          - type: string
                      buttons:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - PHONE_NUMBER
                                - URL
                                - QUICK_REPLY
                                - COPY_CODE
                                - OTP
                            text:
                              type: string
                              maxLength: 25
                            url:
                              type: string
                              format: uri
                            phoneNumber:
                              type: string
                            exampleCode:
                              type: string
                              maxLength: 15
                            urlExampleParam:
                              type: string
                              maxLength: 2000
                          required:
                            - type
                      example:
                        type: object
                        properties:
                          headerText:
                            type: string
                            minLength: 1
                          headerHandle:
                            type: string
                            minLength: 1
                          headerTextNamedParams:
                            type: array
                            items:
                              type: object
                              properties:
                                paramName:
                                  type: string
                                  minLength: 1
                                example:
                                  type: string
                                  minLength: 1
                              required:
                                - paramName
                                - example
                          bodyText:
                            type: array
                            items:
                              type: string
                              minLength: 1
                          bodyTextNamedParams:
                            type: array
                            items:
                              type: object
                              properties:
                                paramName:
                                  type: string
                                  minLength: 1
                                example:
                                  type: string
                                  minLength: 1
                              required:
                                - paramName
                                - example
                    required:
                      - type
                allowCategoryChange:
                  type: boolean
          required:
            - id
            - data
      required:
        - input
      description: Request body for updating a WhatsApp template.
    WhatsappTemplatePayload:
      type: object
      properties:
        whatsappTemplate:
          $ref: '#/components/schemas/WhatsappTemplate'
      required:
        - whatsappTemplate
      description: The created or updated WhatsApp template.
    UserError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
      additionalProperties: false
      description: Standard user-facing error response envelope.
    WhatsappTemplate:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the WhatsApp template.
          example: wat_1234567890abcdefghij
        createdAt:
          type: string
          format: date-time
          description: When the template was created.
        updatedAt:
          type: string
          format: date-time
          description: When the template was last updated.
        organizationId:
          type:
            - string
            - 'null'
          description: Organization that owns the template.
        whatsappAccountId:
          type:
            - string
            - 'null'
          description: WhatsApp Business Account the template belongs to.
        channelId:
          type:
            - string
            - 'null'
          description: Legacy 360dialog channel, if any.
        name:
          type: string
          description: Template name registered with WhatsApp.
          example: recordatorio_pago
        status:
          type: string
          enum:
            - APPROVED
            - ARCHIVED
            - DELETED
            - DISABLED
            - REJECTED
            - PAUSED
            - FLAGGED
            - IN_APPEAL
            - LIMIT_EXCEEDED
            - PENDING
            - PENDING_DELETION
            - SUBMITTED
            - UNKNOWN
          description: Provider approval status.
        rejectedReason:
          type: string
          enum:
            - ABUSIVE_CONTENT
            - INCORRECT_CATEGORY
            - INVALID_FORMAT
            - PROMOTIONAL
            - SCAM
            - TAG_CONTENT_MISMATCH
            - NONE
          description: Why the provider rejected the template, if it did.
        category:
          type: string
          enum:
            - AUTHENTICATION
            - FREE_SERVICE
            - MARKETING
            - UTILITY
          description: WhatsApp template category.
        allowCategoryChange:
          type: boolean
          description: Whether WhatsApp may recategorize the template.
        language:
          type: string
          description: Template language code.
          example: es_MX
        parameterFormat:
          type: string
          enum:
            - NAMED
            - POSITIONAL
          description: Whether variables are positional or named.
        deletedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the template was deleted, if applicable.
        deletedById:
          type:
            - string
            - 'null'
          description: User who deleted the template.
        components:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
                enum:
                  - HEADER
                  - BODY
                  - FOOTER
                  - BUTTONS
              format:
                type:
                  - string
                  - 'null'
              text:
                type:
                  - string
                  - 'null'
            required:
              - id
              - type
              - format
              - text
          description: Header, body, footer, and button components.
      required:
        - id
        - createdAt
        - updatedAt
        - organizationId
        - whatsappAccountId
        - channelId
        - name
        - status
        - rejectedReason
        - category
        - allowCategoryChange
        - language
        - parameterFormat
        - deletedAt
        - deletedById
      description: A WhatsApp message template submitted to the provider.
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: 'Organization API key using `Authorization: Bearer sk_...`.'
    oauthAccessToken:
      type: http
      scheme: bearer
      bearerFormat: OAuth 2.1
      description: 'OAuth access token using `Authorization: Bearer qoa_at_...`.'

````

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