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

# Request Call Permission

> Ask a customer for permission to call them. Works inside the 24-hour window after they last wrote to you; outside it, send an approved template that has a call permission request (Send Template). Scope: send.

Send a customer WhatsApp's Allow calls button. Their answer reaches your webhook as a [`call` event](https://docs.flowapt.com/flowiq-api-reference/webhooks#call) with `kind: "call_permission"`, and the request shows in their chat in FlowIQ. This message is allowed only within 24 hours of the customer last writing to you; outside that window, send an approved template that has a call permission request with [Send Template](https://docs.flowapt.com/flowiq-api-reference/endpoint/send-template.md).

## Basic Usage

```bash theme={null}
curl -X POST "https://api.flowiq.live/v1/calls/permission-requests" \
  -H "Authorization: Bearer fiq_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "27820000000", "body": "We would like to call you about your order. Is that OK?"}'
```

***

## Body Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `to` | string | One of `to` / `contact_id` | The customer's WhatsApp number with country code, digits only |
| `contact_id` | string | One of `to` / `contact_id` | The customer's FlowIQ contact id |
| `body` | string | No | Text above the button (max 1024 characters), e.g. why you want to call |

***

## Response

### Success (200)

```json theme={null}
{
  "organization_id": "a4234f32-…",
  "success": true,
  "message_id": "wamid.HBgLMjc4MjAwMDAwMDAVAgARGBI…",
  "contact_id": "9b8a7c6d-…",
  "whatsapp_id": "27820000000"
}
```

***

## Errors

| Status | When |
| - | - |
| `409` | More than 24 hours since the customer last wrote (`code: "outside_service_window"`); use a template |
| `400` | WhatsApp refused it, e.g. the request limit (1 a day, 2 a week per person) |
| `404` | No contact with that number on your account |


## OpenAPI

````yaml flowiq-api-reference/openapi-calls.json POST /v1/calls/permission-requests
openapi: 3.1.0
info:
  title: FlowIQ Calling API
  version: 1.0.0
  description: >-
    Run WhatsApp calls on your FlowIQ number from your own server: answer,
    decline, end and start calls, ask for call permission, read call history and
    change the number's calling settings. Every response carries X-Request-Id;
    errors carry a stable code; POST / PATCH accept Idempotency-Key.
servers:
  - url: https://api.flowiq.live
    description: FlowIQ Production API
security:
  - BearerAuth: []
paths:
  /v1/calls/permission-requests:
    post:
      tags:
        - Calling
      summary: Request Call Permission
      description: >-
        Ask a customer for permission to call them. Works inside the 24-hour
        window after they last wrote to you; outside it, send an approved
        template that has a call permission request (Send Template). Scope:
        send.
      operationId: requestCallPermission
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                to:
                  type: string
                  description: The customer's WhatsApp number (or send contact_id)
                  example: '27820000000'
                contact_id:
                  type: string
                  format: uuid
                body:
                  type: string
                  maxLength: 1024
                  description: Optional text above the button, e.g. why you want to call
                  example: We'd like to call you about your order.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization_id:
                    type: string
                    format: uuid
                  success:
                    type: boolean
                  message_id:
                    type: string
                  contact_id:
                    type: string
                    format: uuid
                  whatsapp_id:
                    type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Outside the 24-hour window (code outside_service_window)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    BadRequest:
      description: Invalid request, or WhatsApp refused it (the message says why)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Request failed
            message: Parameter value is not valid
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key lacks the scope, or the person has not given call permission
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Request failed
            message: Contact has not granted callback permission
    RateLimited:
      description: 240 reads or 60 actions per minute per key; Retry-After says when
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Short label (Bad request, Not found, …)
        code:
          type: string
          description: Stable machine-readable code, see Conventions
        message:
          type: string
        request_id:
          type: string
          format: uuid
          description: Quote this to support
        whatsapp_error_code:
          type: integer
          description: WhatsApp's own code, on whatsapp_rejected
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: fiq_ API key
      description: >-
        Your FlowIQ organisation API key (Settings → API Keys), sent as a bearer
        token. Format: `Bearer fiq_YOUR_API_KEY`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.