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

# Create a WhatsApp template

> Creates a WhatsApp template in one of your account's WhatsApp Business Accounts, submits it for review, and returns the new template.

Every WhatsApp message you send uses a template, so new message content starts with a new template.

**Behavior:** Returns `201` with the new template. Poll `whatsapp_templates_get` for the review outcome. Returns `409` when the WhatsApp Business Account already has a template with the same `name` and `language`.

**Requires:** Your account must have WhatsApp and its templates capability enabled, must have a subscription plan, and must not be blocked or suspended. The WhatsApp Business Account must have a connected sender; when your account has more than one WhatsApp Business Account, specify `waba_id` or `sender`.



## OpenAPI

````yaml https://wavix.github.io/wavix-openapi/wavix-api.yaml post /v1/whatsapp/templates
openapi: 3.1.0
info:
  title: Wavix APIs
  description: >-
    Wavix provides robust APIs that let you integrate voice and text messaging
    features directly into your app. Send text, place calls, and access detailed
    reports  programmatically.
  termsOfService: https://wavix.com/terms-and-conditions
  license:
    name: MIT
    identifier: MIT
  contact:
    name: Wavix
    url: https://wavix.com
    email: support@wavix.com
  version: 1.1.1
servers:
  - url: https://api.wavix.com
    description: https://api.wavix.com
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: SIP trunks
  - name: Buy
    description: Numbers
  - name: Cart
    description: Numbers
  - name: My numbers
    description: Numbers
  - name: Billing
    description: Billing, transactions, and invoices
  - name: Profile
    description: Account profile and customer information
  - name: CDRs
    description: Call detail records and call history
  - name: Speech Analytics
    description: Call transcription and speech analytics
  - name: SMS and MMS
    description: Messaging
  - name: Number Validator
    description: Phone number validation
  - name: Link shortener
    description: Short link and click metrics
  - name: 2FA
    description: Two-factor authentication
  - name: 10DLC
    description: 10DLC Campaigns and Brands
  - name: API Keys
    description: API key management
  - name: Call webhooks
    description: Webhook configuration for call events
  - name: Call control
    description: Programmable Voice
  - name: Call streaming
    description: Real-time call audio streaming over WebSocket
  - name: Call recording
    description: Call recording
  - name: Sub-accounts
    description: Sub-account management
  - name: Voice campaigns
    description: Outbound voice campaigns
  - name: Wavix Embeddable
    description: WebRTC embeddable widget
  - name: WhatsApp
    description: WhatsApp senders, templates, and messages
paths:
  /v1/whatsapp/templates:
    post:
      tags:
        - WhatsApp
      summary: Create a WhatsApp template
      description: >-
        Creates a WhatsApp template in one of your account's WhatsApp Business
        Accounts, submits it for review, and returns the new template.


        Every WhatsApp message you send uses a template, so new message content
        starts with a new template.


        **Behavior:** Returns `201` with the new template. Poll
        `whatsapp_templates_get` for the review outcome. Returns `409` when the
        WhatsApp Business Account already has a template with the same `name`
        and `language`.


        **Requires:** Your account must have WhatsApp and its templates
        capability enabled, must have a subscription plan, and must not be
        blocked or suspended. The WhatsApp Business Account must have a
        connected sender; when your account has more than one WhatsApp Business
        Account, specify `waba_id` or `sender`.
      operationId: whatsapp_templates_create
      parameters: []
      requestBody:
        description: Attributes of the template to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsAppTemplateCreateRequest'
            examples:
              default:
                summary: Order shipment template with a body and a footer
                value:
                  name: order_shipped
                  language: en_US
                  category: utility
                  sender: '14155550100'
                  components:
                    - type: body
                      text: Hi {{1}}, your order {{2}} has shipped.
                      example:
                        body_text:
                          - - Maria
                            - '#1001'
                    - type: footer
                      text: Reply STOP to unsubscribe.
        required: true
      responses:
        '201':
          description: The created WhatsApp template.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppTemplateResponse'
              examples:
                default:
                  summary: Created template
                  value:
                    template:
                      uuid: 6b1f3c52-9e0a-4d7b-8a15-c2f4e9d07b38
                      name: order_shipped
                      language: en_US
                      category: utility
                      status: draft
                      quality_rating: null
                      components:
                        - type: body
                          text: Hi {{1}}, your order {{2}} has shipped.
                          example:
                            body_text:
                              - - Maria
                                - '#1001'
                        - type: footer
                          text: Reply STOP to unsubscribe.
                      waba:
                        id: '102290129340398'
                        name: Acme Support
                      created_at: '2026-01-15T10:30:00Z'
        '400':
          description: >-
            The body is invalid. The JSON is malformed, a required field is
            missing or empty, `sender` doesn't belong to `waba_id`, or you have
            several WhatsApp Business Accounts and specified neither `waba_id`
            nor `sender`. The `detail` field says which.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/WhatsAppProblem'
              examples:
                invalid-request:
                  value:
                    type: https://wavix.com/problems/invalid-request
                    title: Invalid Request
                    status: 400
                    detail: >-
                      the account has several WhatsApp Business Accounts; pass
                      waba_id or sender to choose one (list them with GET
                      /v1/whatsapp/senders)
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_INVALID_REQUEST
        '401':
          $ref: '#/components/responses/WhatsAppUnauthorizedResponse'
        '403':
          description: >-
            Returns when the account is suspended, blocked, or has no
            subscription plan, the API key has no access to the endpoint, or the
            templates capability is not enabled for the account.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/WhatsAppProblem'
              examples:
                account-suspended:
                  summary: Account is suspended
                  value:
                    type: https://wavix.com/problems/access-denied
                    title: Access Denied
                    status: 403
                    detail: The account is suspended.
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_ACCESS_DENIED
                capability-missing:
                  summary: The templates capability is not enabled
                  value:
                    type: https://wavix.com/problems/capability-missing
                    title: Capability Missing
                    status: 403
                    detail: The templates capability is not enabled for this account.
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_CAPABILITY_MISSING
        '404':
          description: >-
            WhatsApp isn't available for your account or isn't enabled yet. Or
            `waba_id` isn't linked to your account, or you have no WhatsApp
            Business Account and omitted `waba_id`. Or `sender` isn't 6–20
            digits, isn't a sender of your account, or isn't connected. Or the
            WhatsApp Business Account has no connected sender.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/WhatsAppProblem'
              examples:
                whatsapp-not-available:
                  summary: WhatsApp is not available for this account
                  value:
                    type: https://wavix.com/problems/whatsapp-not-available
                    title: WhatsApp Not Available
                    status: 404
                    detail: WhatsApp is not available for this account.
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_WHATSAPP_NOT_AVAILABLE
                channel-not-enabled:
                  summary: WhatsApp is not enabled yet for this account
                  value:
                    type: https://wavix.com/problems/channel-not-enabled
                    title: Channel Not Enabled
                    status: 404
                    detail: The WhatsApp channel is not enabled for this account.
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_CHANNEL_NOT_ENABLED
                waba-not-linked:
                  summary: The WhatsApp Business Account is not linked to the account
                  value:
                    type: https://wavix.com/problems/waba-not-linked
                    title: WABA Not Linked
                    status: 404
                    detail: WABA Not Linked
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_WABA_NOT_LINKED
                sender-not-found:
                  summary: The sender isn't connected
                  value:
                    type: https://wavix.com/problems/sender-not-found
                    title: Sender Not Found
                    status: 404
                    detail: sender 14155550100 is not connected
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_SENDER_NOT_FOUND
                no-connected-sender:
                  summary: The WhatsApp Business Account has no connected sender
                  value:
                    type: https://wavix.com/problems/sender-not-found
                    title: Sender Not Found
                    status: 404
                    detail: >-
                      no connected sender on WhatsApp Business Account
                      102290129340398
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_SENDER_NOT_FOUND
        '409':
          description: >-
            A template with this name and language already exists for the
            WhatsApp Business Account.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/WhatsAppProblem'
              examples:
                template-already-exists:
                  value:
                    type: https://wavix.com/problems/template-already-exists
                    title: Template Already Exists
                    status: 409
                    detail: >-
                      templates: order_shipped/en_US already exists for this
                      sender with status approved
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: permanent
                    error_code: WAVIX_TEMPLATE_ALREADY_EXISTS
        '422':
          description: >-
            The template content is invalid. A component or button has an
            unknown or missing key or an unknown type, `components` is empty, or
            `name`, `language`, or `category` has an invalid value. The `detail`
            field names the field that's wrong.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/WhatsAppProblem'
              examples:
                template-invalid:
                  value:
                    type: https://wavix.com/problems/template-invalid
                    title: Template Invalid
                    status: 422
                    detail: 'components[0]: unknown key "foo"'
                    instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    error_class: invalid_template
                    error_code: WAVIX_TEMPLATE_INVALID
        '429':
          $ref: '#/components/responses/WhatsAppTooManyRequestsResponse'
        '500':
          $ref: '#/components/responses/WhatsAppInternalServerErrorResponse'
        '503':
          $ref: '#/components/responses/WhatsAppServiceUnavailableResponse'
      deprecated: false
      security:
        - bearerAuth:
            - whatsapp:write
components:
  schemas:
    WhatsAppTemplateCreateRequest:
      title: WhatsAppTemplateCreateRequest
      description: >-
        Attributes of a new WhatsApp template. Consumed by
        `whatsapp_templates_create`.
      required:
        - name
        - language
        - category
        - components
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          description: >-
            Template name, made of lowercase letters, digits, and underscores,
            up to 512 characters.
          example: order_shipped
        language:
          type: string
          description: Template language code, such as `en` or `en_US`.
          example: en_US
        category:
          type: string
          description: |-
            Template category. Possible values:

            - `marketing` — Promotions, offers, and other marketing content.
            - `authentication` — One-time passcodes for verifying a user.
            - `utility` — Transactional updates about an order or an account.
          enum:
            - marketing
            - authentication
            - utility
          example: utility
        components:
          type: array
          description: >-
            Structural components of the template. Each component type can
            appear once, exactly one `body` component is required, and `type`
            and `format` values must be lowercase.
          minItems: 1
          items:
            $ref: '#/components/schemas/WhatsAppTemplateComponentRequest'
        waba_id:
          type: string
          description: >-
            ID of the WhatsApp Business Account that owns the template, as
            returned in `waba.id` by `whatsapp_senders_list`. Required when your
            account has more than one, unless `sender` is set. When both are
            set, `sender` must belong to this WhatsApp Business Account.
          example: '102290129340398'
        sender:
          type: string
          description: >-
            Phone number of a connected sender whose WhatsApp Business Account
            owns the template, as an alternative to `waba_id`. When both are
            set, the sender must belong to `waba_id`. The leading `+` is
            optional.
          pattern: ^\+?\d{6,20}$
          example: '14155550100'
    WhatsAppTemplateResponse:
      title: WhatsAppTemplateResponse
      description: Returned by `whatsapp_templates_get` and `whatsapp_templates_create`.
      required:
        - template
      type: object
      additionalProperties: false
      properties:
        template:
          $ref: '#/components/schemas/WhatsAppTemplate'
    WhatsAppProblem:
      title: WhatsAppProblem
      description: >-
        An RFC 9457 problem document that describes an error from the WhatsApp
        API. Returned with the `application/problem+json` content type.
      required:
        - type
        - title
        - status
        - detail
        - instance
      type: object
      additionalProperties: false
      properties:
        type:
          type: string
          description: URI that identifies the problem type.
          example: https://wavix.com/problems/whatsapp-not-available
        title:
          type: string
          description: Short, human-readable summary of the problem type.
          example: WhatsApp Not Available
        status:
          type: integer
          format: int32
          description: HTTP status code of the response.
          example: 404
        detail:
          type: string
          description: Human-readable explanation of this occurrence of the problem.
          example: WhatsApp is not available for this account.
        instance:
          type: string
          description: Request ID of this occurrence of the problem.
          example: 3a525ca2-6909-4c72-9399-905adf7f3a74
        error_class:
          type: string
          description: >-
            Machine-readable classification of the error. Possible values:


            - `permanent` — The request can't succeed as sent. Retrying doesn't
            help.

            - `retriable` — The failure is temporary. Retrying can succeed.

            - `rate_limited` — The request was rate limited. Retry later.

            - `invalid_template` — The template content is invalid.
          enum:
            - permanent
            - retriable
            - rate_limited
            - invalid_template
          example: permanent
        error_code:
          type: string
          description: >-
            Stable machine-readable error code. It's the problem type slug in
            upper case with the `WAVIX_` prefix.
          example: WAVIX_WHATSAPP_NOT_AVAILABLE
    WhatsAppTemplateComponentRequest:
      title: WhatsAppTemplateComponentRequest
      description: >-
        A header, body, footer, or buttons component of a new WhatsApp template.
        Consumed by `whatsapp_templates_create`. The `type` field selects the
        variant, and a `header` component is further selected by `format`.
      type: object
      required:
        - type
      oneOf:
        - $ref: '#/components/schemas/WhatsAppTemplateHeaderComponentRequest'
        - $ref: '#/components/schemas/WhatsAppTemplateBodyComponentRequest'
        - $ref: '#/components/schemas/WhatsAppTemplateFooterComponentRequest'
        - $ref: '#/components/schemas/WhatsAppTemplateButtonsComponentRequest'
      discriminator:
        propertyName: type
        mapping:
          header: '#/components/schemas/WhatsAppTemplateHeaderComponentRequest'
          body: '#/components/schemas/WhatsAppTemplateBodyComponentRequest'
          footer: '#/components/schemas/WhatsAppTemplateFooterComponentRequest'
          buttons: '#/components/schemas/WhatsAppTemplateButtonsComponentRequest'
    WhatsAppTemplate:
      title: WhatsAppTemplate
      description: >-
        A WhatsApp message template with its review status and components.
        Returned by `whatsapp_templates_list`, `whatsapp_templates_get`, and
        `whatsapp_templates_create`.
      required:
        - uuid
        - name
        - language
        - category
        - status
        - quality_rating
        - components
        - waba
        - created_at
      type: object
      additionalProperties: false
      properties:
        uuid:
          type: string
          format: uuid
          description: >-
            ID of the template. Pass it to `whatsapp_templates_get` to check the
            review outcome.
          example: 6b1f3c52-9e0a-4d7b-8a15-c2f4e9d07b38
        name:
          type: string
          description: Template name.
          example: order_shipped
        language:
          type: string
          description: Template language code.
          example: en_US
        category:
          type: string
          description: |-
            Template category. Possible values:

            - `marketing` — Promotions, offers, and other marketing content.
            - `authentication` — One-time passcodes for verifying a user.
            - `utility` — Transactional updates about an order or an account.
          enum:
            - marketing
            - authentication
            - utility
          example: utility
        status:
          type: string
          description: >-
            Template review status. Possible values:


            - `draft` — The template is created but not yet submitted to the
            provider.

            - `pending` — The provider is reviewing the template.

            - `approved` — The template is approved and can be sent.

            - `rejected` — The provider rejected the template.

            - `paused` — The provider paused the template.

            - `flagged` — The provider flagged the template. It can still be
            sent.

            - `disabled` — The template is disabled and can't be sent.

            - `in_appeal` — An appeal of the review decision is in progress.

            - `pending_deletion` — The template is being deleted.

            - `deleted` — The template was deleted.

            - `unknown` — The provider reported a status that Wavix doesn't
            recognize.
          enum:
            - draft
            - pending
            - approved
            - rejected
            - paused
            - flagged
            - disabled
            - in_appeal
            - pending_deletion
            - deleted
            - unknown
          example: approved
        quality_rating:
          type:
            - string
            - 'null'
          description: >-
            Template's messaging quality rating. Meta rates quality from
            customer feedback over the past seven days, such as blocks and
            reports. Possible values:


            - `high` — High quality.

            - `medium` — Medium quality.

            - `low` — Low quality.

            - `unknown` — Not rated yet.
          enum:
            - high
            - medium
            - low
            - unknown
            - null
          example: high
        submitted_at:
          type: string
          format: date-time
          description: >-
            Date and time the template's state was last updated from WhatsApp,
            in ISO 8601 format.
          example: '2026-01-15T10:30:00Z'
        components:
          type: array
          description: Structural components of the template.
          items:
            $ref: '#/components/schemas/WhatsAppTemplateResponseComponent'
        waba:
          $ref: '#/components/schemas/WhatsAppWaba'
        created_at:
          type: string
          format: date-time
          description: Date and time the template was created, in ISO 8601 format.
          example: '2026-01-15T10:30:00Z'
    WhatsAppTemplateHeaderComponentRequest:
      title: WhatsAppTemplateHeaderComponentRequest
      description: >-
        Header of a new WhatsApp template. Consumed by
        `whatsapp_templates_create`. The `format` field selects the variant.
      type: object
      required:
        - type
        - format
      oneOf:
        - $ref: '#/components/schemas/WhatsAppTemplateTextHeaderComponentRequest'
        - $ref: '#/components/schemas/WhatsAppTemplateMediaHeaderComponentRequest'
        - $ref: '#/components/schemas/WhatsAppTemplateLocationHeaderComponentRequest'
      discriminator:
        propertyName: format
        mapping:
          text: '#/components/schemas/WhatsAppTemplateTextHeaderComponentRequest'
          image: '#/components/schemas/WhatsAppTemplateMediaHeaderComponentRequest'
          video: '#/components/schemas/WhatsAppTemplateMediaHeaderComponentRequest'
          document: '#/components/schemas/WhatsAppTemplateMediaHeaderComponentRequest'
          location: '#/components/schemas/WhatsAppTemplateLocationHeaderComponentRequest'
    WhatsAppTemplateBodyComponentRequest:
      title: WhatsAppTemplateBodyComponentRequest
      description: >-
        Body of a new WhatsApp template. Required, exactly once. Consumed by
        `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - text
      properties:
        type:
          type: string
          description: Component type.
          const: body
        text:
          type: string
          description: Body text, with positional `{{n}}` placeholders.
          example: Hi {{1}}, your order {{2}} has shipped.
        example:
          type: object
          description: Sample values for the placeholders in the body text.
          additionalProperties: false
          required:
            - body_text
          properties:
            body_text:
              type: array
              description: One set of sample values, one value per placeholder in order.
              minItems: 1
              maxItems: 1
              items:
                type: array
                minItems: 1
                items:
                  type: string
              example:
                - - Maria
                  - '#1001'
    WhatsAppTemplateFooterComponentRequest:
      title: WhatsAppTemplateFooterComponentRequest
      description: >-
        Footer of a new WhatsApp template. Consumed by
        `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - text
      properties:
        type:
          type: string
          description: Component type.
          const: footer
        text:
          type: string
          description: Footer text.
          example: Reply STOP to unsubscribe.
    WhatsAppTemplateButtonsComponentRequest:
      title: WhatsAppTemplateButtonsComponentRequest
      description: >-
        Buttons component of a new WhatsApp template. Consumed by
        `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - buttons
      properties:
        type:
          type: string
          description: Component type.
          const: buttons
        buttons:
          type: array
          description: Buttons, in display order.
          minItems: 1
          items:
            $ref: '#/components/schemas/WhatsAppTemplateButtonRequest'
    WhatsAppTemplateResponseComponent:
      title: WhatsAppTemplateResponseComponent
      description: >-
        A component of a stored WhatsApp template. Returned inside templates by
        `whatsapp_templates_list`, `whatsapp_templates_get`, and
        `whatsapp_templates_create`. Section types other than header, body,
        footer, and buttons can carry fields of their own.
      required:
        - type
      type: object
      additionalProperties: true
      properties:
        type:
          type: string
          description: >-
            Component type: `header`, `body`, `footer`, `buttons`, or the
            lower-cased name of another section type carried over from an
            imported template, such as `carousel` or `limited_time_offer`.
          example: body
        format:
          type: string
          description: >-
            Header content format. Present on `header` components only. Possible
            values:


            - `text` — Text header.

            - `image` — Image header.

            - `video` — Video header.

            - `document` — Document header.

            - `location` — Location header.
          enum:
            - text
            - image
            - video
            - document
            - location
          example: text
        text:
          type: string
          description: Component text, with `{{n}}` placeholders where applicable.
          example: Hi {{1}}, your order {{2}} has shipped.
        example:
          type: object
          description: >-
            Sample values for the component's placeholders, in the shape the
            provider expects.
          additionalProperties: true
        buttons:
          type: array
          description: Button definitions. Present on `buttons` components only.
          items:
            type: object
            additionalProperties: true
    WhatsAppWaba:
      title: WhatsAppWaba
      description: >-
        A WhatsApp Business Account linked to your account, embedded in senders
        and templates.
      required:
        - id
        - name
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: ID of the WhatsApp Business Account.
          example: '102290129340398'
        name:
          type:
            - string
            - 'null'
          description: Name of the WhatsApp Business Account.
          example: Acme Support
    WhatsAppTemplateTextHeaderComponentRequest:
      title: WhatsAppTemplateTextHeaderComponentRequest
      description: >-
        Text header of a new WhatsApp template. Requires `text`. Consumed by
        `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - format
        - text
      properties:
        type:
          type: string
          description: Component type.
          const: header
        format:
          type: string
          description: Header content format.
          const: text
        text:
          type: string
          description: Header text, with an optional `{{1}}` placeholder.
          example: Order {{1}}
        example:
          type: object
          description: Sample for the `{{1}}` placeholder.
          additionalProperties: false
          required:
            - header_text
          properties:
            header_text:
              type: array
              description: Sample value for the `{{1}}` placeholder in the header text.
              minItems: 1
              maxItems: 1
              items:
                type: string
              example:
                - '#1001'
    WhatsAppTemplateMediaHeaderComponentRequest:
      title: WhatsAppTemplateMediaHeaderComponentRequest
      description: >-
        Media header of a new WhatsApp template. Takes no `text`. Consumed by
        `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - format
      properties:
        type:
          type: string
          description: Component type.
          const: header
        format:
          type: string
          description: |-
            Header content format. Possible values:

            - `image` — Image header.
            - `video` — Video header.
            - `document` — Document header.
          enum:
            - image
            - video
            - document
          example: image
        example:
          type: object
          description: Sample media file.
          additionalProperties: false
          required:
            - header_handle
          properties:
            header_handle:
              type: array
              description: >-
                Public `http` or `https` URL of a sample media file. Meta's own
                API expects an upload handle here; Wavix sends the URL to the
                provider as the sample.
              minItems: 1
              maxItems: 1
              items:
                type: string
              example:
                - https://example.com/sample.png
    WhatsAppTemplateLocationHeaderComponentRequest:
      title: WhatsAppTemplateLocationHeaderComponentRequest
      description: >-
        Location header of a new WhatsApp template. Takes neither `text` nor
        `example`. Consumed by `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - format
      properties:
        type:
          type: string
          description: Component type.
          const: header
        format:
          type: string
          description: Header content format.
          const: location
    WhatsAppTemplateButtonRequest:
      title: WhatsAppTemplateButtonRequest
      description: >-
        A button in the `buttons` component of a new WhatsApp template. Consumed
        by `whatsapp_templates_create`. The `type` field selects the variant.
      type: object
      required:
        - type
      oneOf:
        - $ref: '#/components/schemas/WhatsAppTemplateQuickReplyButtonRequest'
        - $ref: '#/components/schemas/WhatsAppTemplateUrlButtonRequest'
        - $ref: '#/components/schemas/WhatsAppTemplatePhoneNumberButtonRequest'
        - $ref: '#/components/schemas/WhatsAppTemplateCopyCodeButtonRequest'
      discriminator:
        propertyName: type
        mapping:
          quick_reply: '#/components/schemas/WhatsAppTemplateQuickReplyButtonRequest'
          url: '#/components/schemas/WhatsAppTemplateUrlButtonRequest'
          phone_number: '#/components/schemas/WhatsAppTemplatePhoneNumberButtonRequest'
          copy_code: '#/components/schemas/WhatsAppTemplateCopyCodeButtonRequest'
    WhatsAppTemplateQuickReplyButtonRequest:
      title: WhatsAppTemplateQuickReplyButtonRequest
      description: >-
        Button that sends its label back as a reply. Consumed by
        `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - text
      properties:
        type:
          type: string
          description: Button type.
          const: quick_reply
        text:
          type: string
          description: Button label.
          example: Stop promotions
    WhatsAppTemplateUrlButtonRequest:
      title: WhatsAppTemplateUrlButtonRequest
      description: Button that opens a URL. Consumed by `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - text
        - url
      properties:
        type:
          type: string
          description: Button type.
          const: url
        text:
          type: string
          description: Button label.
          example: Track order
        url:
          type: string
          description: Target URL, optionally ending in a `{{1}}` placeholder.
          example: https://example.com/track/{{1}}
        example:
          type: array
          description: Sample full URL for a `url` that ends in `{{1}}`.
          minItems: 1
          maxItems: 1
          items:
            type: string
          example:
            - https://example.com/track/1001
    WhatsAppTemplatePhoneNumberButtonRequest:
      title: WhatsAppTemplatePhoneNumberButtonRequest
      description: >-
        Button that calls a phone number. Consumed by
        `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - text
        - phone_number
      properties:
        type:
          type: string
          description: Button type.
          const: phone_number
        text:
          type: string
          description: Button label.
          example: Call us
        phone_number:
          type: string
          description: Phone number to call, in E.164 format.
          example: '+31203692036'
    WhatsAppTemplateCopyCodeButtonRequest:
      title: WhatsAppTemplateCopyCodeButtonRequest
      description: >-
        Button that copies a code to the clipboard. Consumed by
        `whatsapp_templates_create`.
      type: object
      additionalProperties: false
      required:
        - type
        - example
      properties:
        type:
          type: string
          description: Button type.
          const: copy_code
        example:
          type: string
          description: Sample code.
          example: SAVE10
  responses:
    WhatsAppUnauthorizedResponse:
      description: Authentication failed or wasn't provided.
      headers: {}
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/WhatsAppProblem'
          examples:
            authentication-required:
              summary: The API key or token is missing or isn't valid
              value:
                type: https://wavix.com/problems/authentication-required
                title: Authentication Required
                status: 401
                detail: Authentication is required to access this resource.
                instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                error_class: permanent
                error_code: WAVIX_AUTHENTICATION_REQUIRED
    WhatsAppTooManyRequestsResponse:
      description: Returns when the account has exceeded its request rate limit.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
            example: 30
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/WhatsAppProblem'
          examples:
            rate-limited:
              value:
                type: https://wavix.com/problems/rate-limited
                title: Rate Limited
                status: 429
                detail: Too many requests. Try again later.
                instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                error_class: rate_limited
                error_code: WAVIX_RATE_LIMITED
    WhatsAppInternalServerErrorResponse:
      description: >-
        Returns when an unexpected error occurs on the server; the request may
        be retried.
      headers: {}
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/WhatsAppProblem'
          examples:
            internal-error:
              value:
                type: https://wavix.com/problems/internal-error
                title: Internal Error
                status: 500
                detail: Internal Error
                instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                error_class: retriable
                error_code: WAVIX_INTERNAL_ERROR
    WhatsAppServiceUnavailableResponse:
      description: >-
        Returns when the service is temporarily unavailable; the request may be
        retried.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/WhatsAppProblem'
          examples:
            service-unavailable:
              value:
                type: https://wavix.com/problems/service-unavailable
                title: Service Unavailable
                status: 503
                detail: The service is temporarily unavailable.
                instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                error_class: retriable
                error_code: WAVIX_SERVICE_UNAVAILABLE
            provider-unavailable:
              value:
                type: https://wavix.com/problems/provider-unavailable
                title: Provider Unavailable
                status: 503
                detail: The provider is temporarily unavailable.
                instance: 3a525ca2-6909-4c72-9399-905adf7f3a74
                error_class: retriable
                error_code: WAVIX_PROVIDER_UNAVAILABLE
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Wavix API key. Pass as `Authorization: Bearer <api_key>`. Keys support
        per-resource scopes (none / read / write). See [Restricted keys and
        scopes](https://docs.wavix.com/api-reference/authentication#restricted-keys-and-scopes).

````

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