{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/groundmail-dev/json-schema/groundmail-dev-device-authorization-request-schema.json",
  "title": "DeviceAuthorizationRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/groundmail-dev-oauth-api-openapi.yml#/components/schemas/DeviceAuthorizationRequest",
  "type": "object",
  "required": [
    "client_id"
  ],
  "properties": {
    "client_id": {
      "type": "string",
      "description": "`groundmail-cli`, or a client registered with the device_code grant type"
    },
    "scope": {
      "type": "string",
      "description": "Space-separated scopes; defaults to `full`"
    },
    "device_name": {
      "type": "string",
      "description": "Shown on the approval page and in Settings → CLIs & agents (e.g. the hostname)"
    },
    "workspace": {
      "type": "string",
      "description": "Workspace name or id to preselect on the approval page (a hint, not a grant)"
    }
  }
}