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

# Start a device sign-in

> Starts an OAuth 2.0 device authorization (RFC 8628). Show the user
`user_code` and `verification_uri`, then poll
`POST /v1/auth/device/token` with `device_code` every `interval`
seconds until the user approves. The codes expire after 15 minutes.
Needs no authentication and takes no request body.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/auth/device/code
openapi: 3.1.0
info:
  title: Qumo Deploy REST API
  description: >
    The Qumo Deploy control plane: organizations, projects, signing keys,
    machine

    identities, access control, audit and billing. Relay credentials are not

    issued here: your app signs them with its own

    [signing keys](/guides/signing-keys).


    Every operation here is generated against the routes the server registers

    and checked in CI, so an operation in this reference exists and a route

    missing from it is deliberately internal (relay mesh, webhooks, probes,

    operator-only and browser sign-in routes).


    Errors are JSON objects with one `error` field. What each status code means

    is in [Error codes](/guides/error-codes); the token scope each permission

    needs is in [Scopes and permissions](/guides/scopes-permissions).
  version: 1.0.0
servers:
  - url: https://api.qumo-deploy.com
    description: Public API (Bearer tokens only; cookies are ignored)
security: []
tags:
  - name: Account
    description: The signed-in user's own sessions, tokens, security settings and data.
  - name: Device flow
    description: OAuth 2.0 device authorization, used by `qumod login`.
  - name: Organizations
    description: Organizations, their members and usage.
  - name: Projects
    description: Projects inside an organization.
  - name: Signing keys
    description: Keys your app signs relay credentials with.
  - name: Relays
    description: Where clients of a broadcast path connect.
  - name: Identities
    description: Machine identities, their tokens and IP allowlists.
  - name: Access control
    description: Roles, IAM bindings and invitations.
  - name: Audit
    description: The audit log and its webhook.
  - name: Notifications
    description: Notification policies.
  - name: Billing
    description: Plans, usage cost, budgets, invoices and payment methods.
  - name: Pricing
    description: Public price list.
paths:
  /v1/auth/device/code:
    post:
      tags:
        - Device flow
      summary: Start a device sign-in
      description: |
        Starts an OAuth 2.0 device authorization (RFC 8628). Show the user
        `user_code` and `verification_uri`, then poll
        `POST /v1/auth/device/token` with `device_code` every `interval`
        seconds until the user approves. The codes expire after 15 minutes.
        Needs no authentication and takes no request body.
      operationId: requestDeviceCode
      responses:
        '200':
          description: A new device code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceCode'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security: []
components:
  schemas:
    DeviceCode:
      type: object
      required:
        - device_code
        - user_code
        - verification_uri
        - expires_in
        - interval
      properties:
        device_code:
          type: string
          description: The code to poll with. Keep it private.
          example: Xq7vR2mK9pL4tN8wZ3cY6bH1jF5sD0aG2eU7iO4kM9n
        user_code:
          type: string
          description: The code the user enters at `verification_uri`.
          pattern: ^[A-Z2-9]{4}-[A-Z2-9]{4}$
          example: WDJB-MJHT
        verification_uri:
          type: string
          format: uri
          description: The console page where the user approves the sign-in.
          example: https://console.qumo-deploy.com/device
        expires_in:
          type: integer
          description: Seconds until the codes expire.
          example: 900
        interval:
          type: integer
          description: Minimum seconds between polls.
          example: 5
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: A human-readable message.
          example: organization_id is required
  responses:
    ServiceUnavailable:
      description: >-
        A dependency is unavailable or not configured. See [Error
        codes](/guides/error-codes).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````

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