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

# Issue a scoped WebRTC calling token

> Issues a single-use WebRTC token for the RevDesk WebRTC SDK, pinned to one caller ID (from_number, which must be a number you own) and one destination (to_number). The token is an opaque RevDesk token — pass it to the @revdesk/webrtc SDK to place exactly that one call. It is valid only for that single call and is invalidated when the call ends; it cannot be reused. (Token lifetime covers the platform max call duration so it never cuts an active call.)



## OpenAPI

````yaml /openapi.json post /v1/webrtc-token
openapi: 3.1.0
info:
  title: RevDesk v1 API
  version: 1.0.0
  description: >-
    Programmatic access to the RevDesk voice platform — calls, numbers, caller
    trust, and brands.
  contact:
    name: RevDesk
    email: support@revdesk.com
servers:
  - url: https://api.revdesk.com
security:
  - bearerAuth: []
tags:
  - name: Phone Numbers
  - name: Caller IDs
  - name: Enterprise Registration
  - name: Branded Calling
  - name: Calls
  - name: SMS
  - name: WebRTC
  - name: Reputation
  - name: Usage
  - name: Account
  - name: Documents
  - name: Sub-entities
paths:
  /v1/webrtc-token:
    post:
      tags:
        - WebRTC
      summary: Issue a scoped WebRTC calling token
      description: >-
        Issues a single-use WebRTC token for the RevDesk WebRTC SDK, pinned to
        one caller ID (from_number, which must be a number you own) and one
        destination (to_number). The token is an opaque RevDesk token — pass it
        to the @revdesk/webrtc SDK to place exactly that one call. It is valid
        only for that single call and is invalidated when the call ends; it
        cannot be reused. (Token lifetime covers the platform max call duration
        so it never cuts an active call.)
      operationId: v1_webrtc_token_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            UUID — when present, deduplicates repeat submissions. See
            /api-reference/idempotency.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: http://json-schema.org/draft-07/schema#
              type: object
              properties:
                from_number:
                  type: string
                  pattern: ^\+[1-9]\d{1,14}$
                to_number:
                  type: string
                  pattern: ^\+[1-9]\d{1,14}$
              required:
                - from_number
                - to_number
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $schema: http://json-schema.org/draft-07/schema#
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                      expires_in:
                        type: number
                      call_id:
                        type: string
                      from_number:
                        type: string
                      to_number:
                        type: string
                    required:
                      - token
                      - expires_in
                      - call_id
                      - from_number
                      - to_number
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Conflict (incl. idempotency conflicts)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            fields:
              type: object
              additionalProperties:
                type: string
            doc_url:
              type: string
              format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````