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

# Call action

> WhatsApp Business Calling control. `action`: connect / pre_accept / accept / reject / terminate. Requires a Tier 2K+ number with calling enabled.



## OpenAPI

````yaml openapi.meta.json POST /{phoneNumberId}/calls
openapi: 3.1.0
info:
  title: Meta Cloud API Layer
  version: 1.0.0
  description: >-
    Pilot Status API Layer — Meta Cloud API (WhatsApp Cloud API / Graph API
    passthrough). Base URL `https://pilotstatus.com.br/api/layer/meta`. Call
    Graph API nodes exactly as on `graph.facebook.com/<version>/` — Pilot swaps
    your `ps_` key for the number's real Meta system token. The `vNN.N` version
    prefix is optional (defaults to v22.0). Account/business/auth management and
    number (de)registration are blocked.
servers:
  - url: https://pilotstatus.com.br/api/layer/meta
security:
  - apiKey: []
tags:
  - name: Messages
  - name: Media
  - name: By id
  - name: Templates
  - name: Phone numbers
  - name: Business profile
  - name: Groups
  - name: Calls
paths:
  /{phoneNumberId}/calls:
    post:
      tags:
        - Calls
      summary: Call action
      description: >-
        WhatsApp Business Calling control. `action`: connect / pre_accept /
        accept / reject / terminate. Requires a Tier 2K+ number with calling
        enabled.
      operationId: post__phoneNumberId_calls
      parameters:
        - name: phoneNumberId
          in: path
          required: true
          schema:
            type: string
          description: Meta phone-number id of the number linked to your API key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                messaging_product:
                  type: string
                  description: Always `whatsapp`.
                  enum:
                    - whatsapp
                  example: whatsapp
                to:
                  type: string
                  description: Callee MSISDN (for `connect`).
                  example: '5511999999999'
                action:
                  type: string
                  description: Call control action.
                  enum:
                    - connect
                    - pre_accept
                    - accept
                    - reject
                    - terminate
                  example: connect
                call_id:
                  type: string
                  description: Existing call id (accept/reject/terminate/pre_accept).
                session:
                  type: object
                  properties:
                    sdp_type:
                      type: string
                      enum:
                        - offer
                        - answer
                    sdp:
                      type: string
                      description: WebRTC SDP.
                  description: WebRTC session (connect/accept/pre_accept).
                  example:
                    sdp_type: offer
                    sdp: v=0...
              required:
                - messaging_product
                - action
      responses:
        '200':
          description: Meta Graph API response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  messaging_product:
                    type: string
                  calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
              example:
                messaging_product: whatsapp
                calls:
                  - id: wacid.ABC...
        default:
          description: Meta Graph API error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error.
                      type:
                        type: string
                        description: e.g. `OAuthException`.
                      code:
                        type: integer
                      error_subcode:
                        type: integer
                      error_data:
                        type: object
                      fbtrace_id:
                        type: string
                description: Meta Graph API error envelope.
              example:
                error:
                  message: (#131030) Recipient phone number not in allowed list
                  type: OAuthException
                  code: 131030
                  fbtrace_id: A...
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Pilot Status API key (ps_...). You may also send `Authorization:
        Bearer ps_...` or `?access_token=ps_...`.

````