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

# Start a TV pairing

> TV requests a pairing code/QR payload.



## OpenAPI

````yaml /openapi/user.yaml post /api/v1/auth/devices/pair
openapi: 3.0.3
info:
  title: CapeMedia User Service API
  version: 1.0.0
  description: |2-

        **CapeMedia User Service API** - Comprehensive user service and management system.

        ## Authentication
        This API uses **JWT Bearer tokens** for authentication.

        1. Login via `/api/v1/auth/login` to obtain tokens
        2. Include the access token in the `Authorization` header: `Bearer <access_token>`
        3. Refresh expired tokens via `/api/v1/auth/refresh-token`

        ## Versioning
        The API uses URL path versioning (e.g., `/api/v1/`, `/api/v2/`).
        Current version: **v1**
        
  contact:
    name: API Support
    email: support@capemedia.co.ke
  license:
    name: Cape Media
servers:
  - url: https://api.diginacape.co.ke/acl
    description: Production
  - url: http://sapi.diginacape.co.ke/acl
    description: Local development
security: []
paths:
  /api/v1/auth/devices/pair:
    post:
      tags:
        - Device Pairing
      summary: Start a TV pairing
      description: TV requests a pairing code/QR payload.
      operationId: devices_pair_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevicePairingCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DevicePairingCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DevicePairingCreateRequest'
      responses:
        '201':
          description: No response body
      security:
        - bearerAuth: []
        - {}
components:
  schemas:
    DevicePairingCreateRequest:
      type: object
      description: Optional TV-provided hint shown to the user during confirmation.
      properties:
        device_label:
          type: string
          default: ''
          maxLength: 100
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT token in the format: Bearer <token>'

````