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

# Create a WhatsApp Business message template

> Creates a message template under the given WhatsApp Business account. Body fields (`name`, `language`, `category`, `components`, `parameterFormat`, `allowCategoryChange`) map to Meta's `POST /{waba_id}/message_templates` payload; component JSON should follow Meta's components reference and is forwarded unchanged. Returns Meta's `{ id, status, category }` — newly-created templates start in `PENDING` and require Meta approval before they can be sent.



## OpenAPI

````yaml https://spectrum.photon.codes/openapi/json post /projects/{projectId}/whatsapp-business/accounts/{accountId}/templates/
openapi: 3.1.0
info:
  title: Spectrum Cloud External API
  description: Client-facing API for Spectrum Cloud.
  version: 1.0.0
servers:
  - url: https://spectrum.photon.codes
security: []
tags:
  - name: billing
    description: Billing and subscription operations
  - name: imessage
    description: iMessage platform operations
  - name: lines
    description: Phone line enumeration across platforms
  - name: platforms
    description: Platform management operations
  - name: users
    description: User operations
  - name: voice
    description: Voice platform operations
  - name: webhooks
    description: Webhook registration for receiving Spectrum events
  - name: whatsapp-business
    description: WhatsApp Business platform operations
  - name: slack
    description: Slack platform operations
paths:
  /projects/{projectId}/whatsapp-business/accounts/{accountId}/templates/:
    post:
      tags:
        - whatsapp-business
      summary: Create a WhatsApp Business message template
      description: >-
        Creates a message template under the given WhatsApp Business account.
        Body fields (`name`, `language`, `category`, `components`,
        `parameterFormat`, `allowCategoryChange`) map to Meta's `POST
        /{waba_id}/message_templates` payload; component JSON should follow
        Meta's components reference and is forwarded unchanged. Returns Meta's
        `{ id, status, category }` — newly-created templates start in `PENDING`
        and require Meta approval before they can be sent.
      operationId: postProjectsByProjectIdWhatsapp-businessAccountsByAccountIdTemplates
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        - name: projectId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 512
                language:
                  type: string
                  minLength: 2
                  maxLength: 20
                category:
                  type: string
                  enum:
                    - MARKETING
                    - UTILITY
                    - AUTHENTICATION
                components:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                    required:
                      - type
                    additionalProperties: {}
                parameterFormat:
                  type: string
                  enum:
                    - POSITIONAL
                    - NAMED
                allowCategoryChange:
                  type: boolean
              required:
                - name
                - language
                - category
                - components
              additionalProperties: {}
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 512
                language:
                  type: string
                  minLength: 2
                  maxLength: 20
                category:
                  type: string
                  enum:
                    - MARKETING
                    - UTILITY
                    - AUTHENTICATION
                components:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                    required:
                      - type
                    additionalProperties: {}
                parameterFormat:
                  type: string
                  enum:
                    - POSITIONAL
                    - NAMED
                allowCategoryChange:
                  type: boolean
              required:
                - name
                - language
                - category
                - components
              additionalProperties: {}
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 512
                language:
                  type: string
                  minLength: 2
                  maxLength: 20
                category:
                  type: string
                  enum:
                    - MARKETING
                    - UTILITY
                    - AUTHENTICATION
                components:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                    required:
                      - type
                    additionalProperties: {}
                parameterFormat:
                  type: string
                  enum:
                    - POSITIONAL
                    - NAMED
                allowCategoryChange:
                  type: boolean
              required:
                - name
                - language
                - category
                - components
              additionalProperties: {}
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  succeed:
                    type: boolean
                    const: true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      status:
                        type: string
                        enum:
                          - APPROVED
                          - PENDING
                          - REJECTED
                          - PAUSED
                          - IN_APPEAL
                          - PENDING_DELETION
                          - DELETED
                          - DISABLED
                          - LIMIT_EXCEEDED
                      category:
                        type: string
                        enum:
                          - MARKETING
                          - UTILITY
                          - AUTHENTICATION
                    required:
                      - id
                      - status
                      - category
                    additionalProperties: false
                required:
                  - succeed
                  - data
                additionalProperties: false

````