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

# Device Approve

> Branded approve page: bind the pending request to the signed-in user, then
return the loopback redirect_uri (if any) so the browser can bounce back to
the waiting CLI for instant pickup.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/auth/device/approve
openapi: 3.1.0
info:
  title: Visceral Backend
  version: 0.2.0
  description: >-
    The Visceral backend HTTP API. SDK and ingestion endpoints authenticate with
    a workspace API key; dashboard and CLI endpoints authenticate with a user
    session token. Both are sent as `Authorization: Bearer <token>`.
servers:
  - url: https://api.visceralai.dev
security: []
paths:
  /v1/auth/device/approve:
    post:
      tags:
        - auth
      summary: Device Approve
      description: >-
        Branded approve page: bind the pending request to the signed-in user,
        then

        return the loopback redirect_uri (if any) so the browser can bounce back
        to

        the waiting CLI for instant pickup.
      operationId: device_approve_v1_auth_device_approve_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceCodeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceApproveResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - sessionToken: []
components:
  schemas:
    DeviceCodeRequest:
      properties:
        user_code:
          type: string
          maxLength: 32
          minLength: 1
          title: User Code
      type: object
      required:
        - user_code
      title: DeviceCodeRequest
    DeviceApproveResponse:
      properties:
        redirect_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Redirect Uri
      type: object
      required:
        - redirect_uri
      title: DeviceApproveResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    sessionToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Short-lived user access token (ES256 JWT) issued by `POST
        /v1/auth/login` or the CLI device flow.

````