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

# Create message template

> **Protocols:** Meta Cloud API

**Required scope:** `messages:write`



## OpenAPI

````yaml api-reference/features/waba-features-graph.json POST /graph/whatsapp/{version}/{wabaId}/message_templates
openapi: 3.0.3
info:
  title: WABA features Polymorfa Graph API methods
  version: 1.0.0
  description: Task-focused waba features methods exposed by the Polymorfa Graph API.
servers: []
security: []
paths:
  /graph/whatsapp/{version}/{wabaId}/message_templates:
    post:
      tags:
        - Message templates
      summary: Create message template
      description: |-
        **Protocols:** Meta Cloud API

        **Required scope:** `messages:write`
      operationId: graphCreateMessageTemplate
      parameters:
        - schema:
            type: string
            example: v21.0
          required: true
          name: version
          in: path
          description: Specifies version for this path parameter.
        - schema:
            type: string
            example: '200000000000001'
          required: true
          name: wabaId
          in: path
          description: Identifier for the waba.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/graph__GraphCreateMessageTemplateRequest'
      responses:
        '200':
          description: Template submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphCreateMessageTemplateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '403':
          description: Permission error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '404':
          description: Object does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
      security:
        - graph__BearerAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    graph__GraphCreateMessageTemplateRequest:
      type: object
      properties:
        name:
          type: string
          example: order_update
          description: Human-readable name for this resource.
        language:
          type: string
          example: en_US
          description: Language or locale code used for this content.
        category:
          type: string
          enum:
            - UTILITY
            - MARKETING
            - AUTHENTICATION
          example: UTILITY
          description: >-
            Specifies category for this graph graph create message template
            request.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `UTILITY` | Utility. |

            | `MARKETING` | Marketing. |

            | `AUTHENTICATION` | Authentication. |
        allow_category_change:
          type: boolean
          description: Whether allow category change.
        components:
          type: array
          items:
            nullable: true
          description: |-
            Structured components that make up this message or template.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Item alternative | Accepted input |
            | --- | --- |
            | Item alternative 1 | Any JSON value matching this alternative |
            | Item alternative 2 | `null` |
      required:
        - name
        - language
        - category
        - components
    graph__GraphCreateMessageTemplateResponse:
      type: object
      properties:
        id:
          type: string
          description: Identifier for this resource.
        status:
          type: string
          description: Current status of this resource or operation.
        category:
          type: string
          description: >-
            Specifies category for this graph graph create message template
            response.
      required:
        - id
        - status
        - category
    graph__GraphError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable message associated with this result.
            type:
              type: string
              description: Type discriminator for this object.
            code:
              type: number
              description: Stable machine-readable code for this result.
            error_subcode:
              type: number
              description: Machine-readable error subcode for this error.
            error_data:
              nullable: true
              description: |-
                Specifies error data for this error.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Any JSON value matching this alternative |
                | Alternative 2 | `null` |
            fbtrace_id:
              type: string
              description: Identifier for the fbtrace.
          required:
            - message
            - type
            - code
            - fbtrace_id
          description: Error details returned when the operation fails.
      required:
        - error
  securitySchemes:
    graph__BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa organization key (pmfa_ prefix) or project token (pmfa_pt_
        prefix). Client tokens are not accepted by Graph operations.

````