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

# Place a web callback

> Initiates a sandbox click-to-call: Wave dials `to` and bridges it to the destination. Returns immediately with `status: "initiated"`. Terminal statuses (`answered`/`ended`) are not emitted yet — see the Web Callback guide.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/callback
openapi: 3.1.0
info:
  title: Wave API
  version: 1.0.0
  description: >-
    Wave API Platform — Web Callback (sandbox). GENERATED from the
    @wave-sa/shared Zod schemas — do not edit by hand (run `pnpm --filter
    @wave-sa/api generate:openapi`).
servers:
  - url: https://api.wave.sa
security:
  - bearerAuth: []
paths:
  /v1/callback:
    post:
      tags:
        - Callbacks
      summary: Place a web callback
      description: >-
        Initiates a sandbox click-to-call: Wave dials `to` and bridges it to the
        destination. Returns immediately with `status: "initiated"`. Terminal
        statuses (`answered`/`ended`) are not emitted yet — see the Web Callback
        guide.
      operationId: placeCallback
      parameters:
        - name: x-wave-simulate
          in: header
          required: false
          description: >-
            Sandbox-only. Force a simulated error variant for testing. Ignored
            by production keys.
          schema:
            type: string
            enum:
              - rate_limit
              - invalid_queue
              - queue_unavailable
              - server_error
              - invalid_number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                to:
                  type: string
                  pattern: ^(\+966|0)(1[1-9]\d{7}|5\d{8}|800\d{7}|9200\d{6})$
                from_queue:
                  type: string
                caller_id_name:
                  type: string
                  maxLength: 64
                caller_id_number:
                  type: string
                webhook_url:
                  type: string
                  format: uri
                  pattern: ^https\:\/\/
                metadata:
                  type: object
                  additionalProperties:
                    type: string
              required:
                - to
              additionalProperties: false
      responses:
        '202':
          description: Callback initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallbackAccepted'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Sandbox trial expired or permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CallbackAccepted:
      type: object
      properties:
        call_id:
          type: string
          example: call_abc123
        status:
          type: string
          enum:
            - initiated
          example: initiated
        sandbox:
          type: boolean
          example: true
        vitalpbx_channel_id:
          type: string
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      description: Wave's standard bilingual error envelope.
      properties:
        error_code:
          type: string
          enum:
            - INVALID_API_KEY
            - EXPIRED_API_KEY
            - REVOKED_API_KEY
            - SANDBOX_KEY_NOT_ALLOWED
            - INSUFFICIENT_PERMISSIONS
            - RATE_LIMIT_EXCEEDED
            - SANDBOX_EXPIRED
            - OTP_INVALID
            - OTP_EXPIRED
            - OTP_TOO_MANY_ATTEMPTS
            - OTP_RESEND_TOO_SOON
            - OTP_SEND_FAILED
            - INVALID_PHONE_NUMBER
            - CALLBACK_NOT_FOUND
            - CALLBACK_ALREADY_CANCELLED
            - CALLBACK_NOT_CANCELLABLE
            - CALL_NOT_FOUND
            - CALL_FAILED
            - INSUFFICIENT_CREDITS
            - RECORDING_NOT_FOUND
            - RECORDING_URL_EXPIRED
            - SANDBOX_INVALID_QUEUE
            - SANDBOX_QUEUE_UNAVAILABLE
            - SANDBOX_SIMULATED_SERVER_ERROR
            - SANDBOX_DESTINATION_NOT_ALLOWED
            - WEBHOOK_URL_INVALID
            - WEBHOOK_UNREACHABLE
            - WEBHOOK_LIMIT_EXCEEDED
            - WEBHOOK_URL_DUPLICATE
            - WEBHOOK_NOT_FOUND
            - WEBHOOK_VERIFICATION_FAILED
            - SIGNUP_EMAIL_TAKEN
            - SIGNUP_VALIDATION_FAILED
            - VITALPBX_PROVISIONING_FAILED
            - SIGNUP_FAILED
            - API_KEY_NOT_FOUND
            - API_KEY_REVEAL_FORBIDDEN
            - PRODUCTION_ACCESS_ALREADY_REQUESTED
            - VALIDATION_ERROR
            - INTERNAL_ERROR
            - NOT_FOUND
            - INVALID_CREDENTIALS
            - SESSION_REQUIRED
            - INVALID_ACCESS_TOKEN
            - EXPIRED_ACCESS_TOKEN
            - INVALID_REFRESH_TOKEN
            - EXPIRED_REFRESH_TOKEN
            - REFRESH_REUSE_DETECTED
            - REFRESH_ROTATION_RACE
            - SESSION_IDLE_TIMEOUT
            - WEB_CALLING_DISABLED
            - ORIGIN_NOT_ALLOWED
            - WEBRTC_CONCURRENCY_LIMIT
            - WCS_NOT_FOUND
            - WCS_EXPIRED
            - WCS_REVOKED
            - WCS_REUSE_DETECTED
            - WCS_NOT_ALLOWED_AS_BEARER
            - WEBRTC_PROVISIONING_FAILED
            - TURN_UNAVAILABLE
            - PROFILE_VALIDATION_FAILED
            - PASSWORD_VALIDATION_FAILED
            - INVALID_CURRENT_PASSWORD
            - PASSWORD_SSO_ONLY
            - INVALID_NATIONAL_ID
            - NAFATH_INITIATE_FAILED
            - NAFATH_NOT_VERIFIED
            - NAFATH_REJECTED
            - NAFATH_EXPIRED
            - NAFATH_ALREADY_REGISTERED
            - NAFATH_INVALID_WEBHOOK
        message:
          type: string
          description: English message.
        message_ar:
          type: string
          description: Arabic message.
        request_id:
          type: string
        docs_url:
          type: string
          format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_sandbox_*
      description: >-
        Your sandbox API key from the Wave dashboard. Send as `Authorization:
        Bearer sk_sandbox_...`.

````