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

# Mint a TV-style handoff token + meta-QR so the user can finish the connect flow on another device.



## OpenAPI

````yaml /api-reference/openapi.json post /api/widget/sessions/{id}/handoff
openapi: 3.0.3
info:
  title: Polymorfa WhatsApp API
  version: 0.0.0
  description: >-
    Public Polymorfa REST API for sessions, messaging, media, webhooks,
    campaigns, templates, client tokens, widgets, and bridge routing.
  contact:
    name: Polymorfa API
    url: https://docs.polymorfa.com
servers:
  - url: https://api.polymorfa.com
security:
  - BearerAuth: []
paths:
  /api/widget/sessions/{id}/handoff:
    post:
      tags:
        - Widget
      summary: >-
        Mint a TV-style handoff token + meta-QR so the user can finish the
        connect flow on another device.
      operationId: createWidgetHandoff
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '201':
          description: Handoff minted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/WidgetHandoffResponse'
                required:
                  - success
                  - data
        '400':
          description: Bad request — request body or params failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authenticated but not permitted (missing scope or rule violation)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    WidgetHandoffResponse:
      type: object
      properties:
        handoffUrl:
          type: string
        metaQrSvg:
          type: string
        expiresAt:
          type: string
      required:
        - handoffUrl
        - metaQrSvg
        - expiresAt
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
        docs:
          type: string
          description: URL to the documentation for this error
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa organization key (titan_ prefix), project token (titan_pt_
        prefix), or client token (titan_ct_ prefix), where the operation permits
        that audience.

````