{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkbreakers-com/json-schema/linkbreakers-com-agent-claim-schema.json",
  "title": "AgentClaim",
  "description": "What a claim link would hand over.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkbreakers-com-agent-identity-api-openapi.yml#/components/schemas/AgentClaim",
  "properties": {
    "email": {
      "description": "The email the agent named for this claim. The workspace can only be claimed with it.",
      "type": "string"
    },
    "expiresAt": {
      "format": "date-time",
      "title": "When the code stops working",
      "type": "string"
    },
    "postClaimScopes": {
      "items": {
        "$ref": "#/$defs/ApiScope"
      },
      "title": "What the agent may do once the workspace is claimed",
      "type": "array"
    },
    "registeredAt": {
      "format": "date-time",
      "title": "When the agent registered",
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/AgentClaimStatus",
      "title": "Where the link stands"
    }
  },
  "type": "object",
  "$defs": {
    "AgentClaimStatus": {
      "default": "AGENT_CLAIM_STATUS_UNSPECIFIED",
      "description": "Where a claim link stands.\n\n - AGENT_CLAIM_STATUS_PENDING: The link is live: enter the code to claim the workspace\n - AGENT_CLAIM_STATUS_CLAIMED: The workspace has been claimed\n - AGENT_CLAIM_STATUS_EXPIRED: The link or the registration expired, or the agent started a newer claim",
      "enum": [
        "AGENT_CLAIM_STATUS_UNSPECIFIED",
        "AGENT_CLAIM_STATUS_PENDING",
        "AGENT_CLAIM_STATUS_CLAIMED",
        "AGENT_CLAIM_STATUS_EXPIRED"
      ],
      "title": "AgentClaimStatus",
      "type": "string"
    },
    "ApiScope": {
      "default": "API_SCOPE_UNSPECIFIED",
      "description": "ApiScope is one permission an API token or OAuth grant can hold.\n\nA write scope also grants the read scope of the same resource.\n\n - API_SCOPE_UNSPECIFIED: Not a scope. Rejected wherever a scope is expected.\n - API_SCOPE_LINKS_READ: Read links, their QR code images, tags, folders and link settings.\n - API_SCOPE_LINKS_WRITE: Create, update and delete links, tags, folders and link settings.\n - API_SCOPE_WORKFLOWS_READ: Read the workflow steps behind a link and validate them.\n - API_SCOPE_WORKFLOWS_WRITE: Create, connect, update, lay out and delete workflow steps.\n - API_SCOPE_QRCODES_READ: Read QR code designs and QR code templates.\n - API_SCOPE_QRCODES_WRITE: Change QR code designs and create, publish and delete QR code templates.\n - API_SCOPE_PAGE_THEMES_READ: Read page themes and page theme templates.\n - API_SCOPE_PAGE_THEMES_WRITE: Change page themes and create, publish and delete page theme templates.\n - API_SCOPE_MEDIA_READ: Read uploaded media.\n - API_SCOPE_MEDIA_WRITE: Upload and delete media.\n - API_SCOPE_DOMAINS_READ: Read custom domains and their DNS instructions.\n - API_SCOPE_DOMAINS_WRITE: Add, verify, update and delete custom domains.\n - API_SCOPE_VISITORS_READ: Read and search visitors and their attributes.\n - API_SCOPE_VISITORS_WRITE: Identify, update and delete visitors and their attributes.\n - API_SCOPE_ANALYTICS_READ: Read events, metrics, time series, analytics data and dashboards.\n - API_SCOPE_ANALYTICS_WRITE: Create, update and delete analytics dashboards and generate widget summaries.\n - API_SCOPE_WEBHOOKS_READ: Read webhooks.\n - API_SCOPE_WEBHOOKS_WRITE: Create, update and delete webhooks.\n - API_SCOPE_INTEGRATIONS_READ: Read the Slack and Google Forms integrations.\n - API_SCOPE_INTEGRATIONS_WRITE: Connect, configure, test, sync and disconnect the Slack and Google Forms integrations.\n - API_SCOPE_WORKSPACE_READ: Read the workspace and its settings.\n - API_SCOPE_WORKSPACE_WRITE: Update the workspace, request enrollment and delete the workspace.\n - API_SCOPE_MEMBERS_READ: Read workspace members.\n - API_SCOPE_MEMBERS_WRITE: Update, revoke, sign out and remove members. Inviting a member or changing a sign-in email or password needs full access.\n - API_SCOPE_TOKENS_READ: Read API tokens and their scopes, never their secrets.\n - API_SCOPE_TOKENS_WRITE: Create, update and delete API tokens, limited to the scopes the calling token holds.\n - API_SCOPE_BILLING_WRITE: Open checkout, credit top-up and billing portal sessions.\n - API_SCOPE_ASSISTANT_READ: Read the Assistant conversation.\n - API_SCOPE_ASSISTANT_WRITE: Send files to the Assistant, clear the conversation and contact support.",
      "enum": [
        "API_SCOPE_UNSPECIFIED",
        "API_SCOPE_LINKS_READ",
        "API_SCOPE_LINKS_WRITE",
        "API_SCOPE_WORKFLOWS_READ",
        "API_SCOPE_WORKFLOWS_WRITE",
        "API_SCOPE_QRCODES_READ",
        "API_SCOPE_QRCODES_WRITE",
        "API_SCOPE_PAGE_THEMES_READ",
        "API_SCOPE_PAGE_THEMES_WRITE",
        "API_SCOPE_MEDIA_READ",
        "API_SCOPE_MEDIA_WRITE",
        "API_SCOPE_DOMAINS_READ",
        "API_SCOPE_DOMAINS_WRITE",
        "API_SCOPE_VISITORS_READ",
        "API_SCOPE_VISITORS_WRITE",
        "API_SCOPE_ANALYTICS_READ",
        "API_SCOPE_ANALYTICS_WRITE",
        "API_SCOPE_WEBHOOKS_READ",
        "API_SCOPE_WEBHOOKS_WRITE",
        "API_SCOPE_INTEGRATIONS_READ",
        "API_SCOPE_INTEGRATIONS_WRITE",
        "API_SCOPE_WORKSPACE_READ",
        "API_SCOPE_WORKSPACE_WRITE",
        "API_SCOPE_MEMBERS_READ",
        "API_SCOPE_MEMBERS_WRITE",
        "API_SCOPE_TOKENS_READ",
        "API_SCOPE_TOKENS_WRITE",
        "API_SCOPE_BILLING_WRITE",
        "API_SCOPE_ASSISTANT_READ",
        "API_SCOPE_ASSISTANT_WRITE"
      ],
      "type": "string"
    }
  }
}