{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Describe a pending pairing attempt by its `userCode`, so the approve screen can say who is asking and for what. Public: it only echoes what the requester supplied at `start` (application name, key name, return URL) plus the attempt's status and remaining lifetime. It never returns the `deviceId` or a session.",
      "errors": [
        {
          "description": "The `userCode` parameter is missing.",
          "name": "InvalidRequest"
        },
        {
          "description": "No pairing attempt matches the `userCode`.",
          "name": "NotFound"
        },
        {
          "description": "Too many describe calls from this client; retry later.",
          "name": "RateLimited"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "app": {
              "description": "The registered application behind this code, when `start` carried `appDid`. `verified` means the return host proved it belongs to the app's DID; an unverified app still gets a key if the user approves, but the browser is never sent to it.",
              "properties": {
                "did": {
                  "format": "did",
                  "type": "string"
                },
                "handle": {
                  "type": "string"
                },
                "iconUrl": {
                  "format": "uri",
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "verified": {
                  "type": "boolean"
                },
                "verifiedHost": {
                  "type": "string"
                },
                "website": {
                  "format": "uri",
                  "type": "string"
                }
              },
              "required": [
                "did",
                "name",
                "verified"
              ],
              "type": "object"
            },
            "appName": {
              "type": "string"
            },
            "expiresInSecs": {
              "type": "integer"
            },
            "keyName": {
              "type": "string"
            },
            "returnUrl": {
              "format": "uri",
              "type": "string"
            },
            "status": {
              "enum": [
                "pending",
                "approved",
                "denied",
                "expired",
                "consumed"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "expiresInSecs"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "userCode": {
            "description": "The code the requester displayed (case-insensitive).",
            "type": "string"
          }
        },
        "required": [
          "userCode"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "dev.cocore.devicePair.describe",
  "lexicon": 1
}
