> ## 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.

# Request code

> **Protocols:** Meta Cloud API

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



## OpenAPI

````yaml api-reference/features/waba-features-graph.json POST /graph/whatsapp/{version}/{phoneNumberId}/request_code
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}/{phoneNumberId}/request_code:
    post:
      tags:
        - Phone numbers
      summary: Request code
      description: |-
        **Protocols:** Meta Cloud API

        **Required scope:** `messages:write`
      operationId: graphRequestCode
      parameters:
        - schema:
            type: string
            example: v21.0
          required: true
          name: version
          in: path
          description: Specifies version for this path parameter.
        - schema:
            type: string
            example: '123456789012345'
          required: true
          name: phoneNumberId
          in: path
          description: Identifier for the phone number.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/graph__GraphRequestCodeRequest'
      responses:
        '200':
          description: Code requested
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphRequestCodeResponse'
        '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__GraphRequestCodeRequest:
      nullable: true
    graph__GraphRequestCodeResponse:
      nullable: true
    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.

````