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

# Generate call view token

> Issue a short-lived JWT scoped to view one call. Lifetime is `ttl_seconds` from the request body, or 15 minutes if omitted.



## OpenAPI

````yaml post /v1/calls/{id}/view
openapi: 3.0.3
info:
  title: Vatel AI REST API
  description: >-
    Programmatic access for agents, documents, telephony, and session tokens.
    Send `Authorization: Bearer <organization API key>` on all requests unless
    noted. Most error responses return JSON with an `error` string message.
  version: 0.2.6
servers:
  - url: https://api.vatel.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: organization
    description: Organization tied to your API key
  - name: llms
    description: LLM model identifiers
  - name: voices
    description: TTS voice catalog
  - name: agents
    description: Agents, outbound dial, agent versions, and graph versions
  - name: twilio
    description: Imported Twilio phone numbers
  - name: sip-trunks
    description: SIP trunk configuration
  - name: session
    description: Session tokens and voice WebSocket connections.
  - name: documents
    description: Organization knowledge documents and indexed chunks
  - name: calls
    description: Call history, recordings, and live eavesdrop for your organization
  - name: usage-logs
    description: Per-request usage rows for calls and chats
  - name: eavesdrop
    description: Listen to live calls and send supervisor commands over WebSocket.
paths:
  /v1/calls/{id}/view:
    post:
      tags:
        - calls
      summary: Generate call view token
      description: >-
        Issue a short-lived JWT scoped to view one call. Lifetime is
        `ttl_seconds` from the request body, or 15 minutes if omitted.
      operationId: generateCallViewToken
      parameters:
        - name: id
          in: path
          required: true
          description: Call id
          schema:
            type: string
            format: uuid
        - name: organization_id
          in: query
          required: false
          description: >-
            Required when authenticating with an internal API key; scopes the
            request to one organization.
          schema:
            type: string
            format: uuid
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                ttl_seconds:
                  type: integer
                  minimum: 1
                  maximum: 86400
                  description: >-
                    Token lifetime in seconds. Defaults to 900 (15 minutes).
                    Maximum is 86400 (1 day).
      responses:
        '200':
          description: Call view token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallViewTokenResponse'
        '400':
          description: >-
            Invalid call id, invalid `ttl_seconds`, or missing `organization_id`
            for internal API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Call not found or not accessible
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '405':
          description: Method not allowed
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CallViewTokenResponse:
      type: object
      description: Short-lived credential scoped to view one call.
      required:
        - token
      properties:
        token:
          type: string
          description: >-
            JWT with the `view` scope and a `call_id` claim matching the
            requested call.
    ErrorResponse:
      type: object
      description: Standard error body for most non-2xx JSON responses on this API.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable message; may include validation detail.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Send your organization API key as `Authorization: Bearer <key>`.'

````

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