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

# Approve Device Authorization

> Approve a pending device authorization as the signed-in user. The grant can never exceed the approving user's organization role; the polling client redeems it for tokens.



## OpenAPI

````yaml /openapi.json post /v1/orgs/{orgId}/agent-grants/device-authorizations/{userCode}/approve
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/agent-grants/device-authorizations/{userCode}/approve:
    post:
      tags:
        - agentAuth
      summary: Approve Device Authorization
      description: >-
        Approve a pending device authorization as the signed-in user. The grant
        can never exceed the approving user's organization role; the polling
        client redeems it for tokens.
      operationId: agentAuth.approveDeviceAuthorization
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: userCode
          in: path
          required: true
          schema:
            type: string
            pattern: ^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$
            maxLength: 9
            description: >-
              Human-entered pairing code in XXXX-XXXX form, from an unambiguous
              alphabet.
      requestBody:
        required: true
        x-korve-max-bytes: 1048576
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
      responses:
        '200':
          description: >-
            Device authorization approved; the device completes on its next
            poll.
          content:
            application/json:
              schema:
                type: object
                properties:
                  approved:
                    type: boolean
                    enum:
                      - true
                required:
                  - approved
        '404':
          description: Unknown, expired, approved, denied, or consumed device code.
      security:
        - session: []
components:
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````