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

# Upload a WhatsApp Template

> This endpoint allows you to upload a new WhatsApp template for approval.



## OpenAPI

````yaml POST /whatsapp_template/upload
openapi: 3.1.0
info:
  title: Tatango API
  description: Tatango API for messaging services including WhatsApp, SMS, and MMS
  version: 1.0.0
servers:
  - url: https://api.v3.tatango.com
security:
  - apiKeyAuth: []
paths:
  /whatsapp_template/upload:
    post:
      tags:
        - Templates
      summary: Upload a WhatsApp Template
      description: This endpoint allows you to upload a new WhatsApp template for approval.
      requestBody:
        description: The WhatsApp Template upload request.
        content:
          application/json:
            schema:
              required:
                - name
                - language
                - category
                - structure
                - webhookUrl
              type: object
              properties:
                name:
                  description: The name of the WhatsApp template.
                  type: string
                language:
                  description: Language code for the template.
                  type: string
                  minLength: 2
                  maxLength: 5
                category:
                  description: The category of the template.
                  type: string
                  enum:
                    - MARKETING
                    - AUTHENTICATION
                    - UTILITY
                structure:
                  type: object
                  required:
                    - type
                    - body
                  properties:
                    type:
                      type: string
                      enum:
                        - TEXT
                    body:
                      type: object
                      required:
                        - text
                      properties:
                        text:
                          type: string
                          description: The template text content.
                webhookUrl:
                  $ref: '#/components/schemas/WebhookUrl'
            example:
              name: my_template
              language: en
              category: MARKETING
              structure:
                type: TEXT
                body:
                  text: Welcome to the future.
              webhookUrl: https://yourpostbackaddress.com
        required: true
      responses:
        '202':
          description: WhatsApp template upload accepted
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/TransactionResponse'
              example:
                message: WhatsApp template submitted for approval
                transactionId: 019687e1-1b54-70f4-a68a-60af7fa776f4
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              example:
                $ref: '#/components/examples/PhoneNumberValidationError/value'
components:
  schemas:
    WebhookUrl:
      description: URL where webhooks will be sent. Must be a valid HTTPS URL.
      type: string
      maxLength: 255
    TransactionResponse:
      required:
        - message
        - transactionId
      type: object
      properties:
        message:
          description: Success message indicating the request was accepted.
          type: string
        transactionId:
          description: Unique transaction identifier for tracking the message.
          type: string
    ValidationError:
      required:
        - error
        - errors
      type: object
      properties:
        error:
          type: string
          example: Invalid request payload
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Zod error code
                example: invalid_string
              message:
                type: string
                description: Human-readable error message
                example: Not a valid U.S. or Canadian phone number
              path:
                type: array
                items:
                  oneOf:
                    - type: string
                    - type: number
                description: Path to the field that caused the error
                example:
                  - phoneNumber
              validation:
                type: string
                description: Validation type that failed
                example: regex
              minimum:
                type: number
                description: Minimum value for numeric validations
              maximum:
                type: number
                description: Maximum value for numeric validations
              type:
                type: string
                description: Expected data type
              inclusive:
                type: boolean
                description: Whether the boundary is inclusive
              exact:
                type: boolean
                description: Whether the validation requires exact match
            required:
              - code
              - message
              - path
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Tatango API key. This is required for all requests to the API. You
        can find your API key in the Tatango App under My Account -> API ->
        Create API Key.

````