{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pricklymails-com/json-schema/pricklymails-com-list-agents-response-schema.json",
  "title": "ListAgentsResponse",
  "description": "`GET /api/agents` response body: a paginated page of the caller's agents.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pricklymails-com-agents-api-openapi.yml#/components/schemas/ListAgentsResponse",
  "type": "object",
  "required": [
    "agents",
    "limit",
    "offset"
  ],
  "properties": {
    "agents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentResponse"
      },
      "description": "The caller's agents, newest first."
    },
    "limit": {
      "type": "integer",
      "format": "int64",
      "description": "Page size applied after clamping."
    },
    "offset": {
      "type": "integer",
      "format": "int64",
      "description": "Offset applied."
    }
  },
  "$defs": {
    "AgentResponse": {
      "type": "object",
      "description": "Metadata of an agent, returned when creating, listing, reading or revoking agents.\n`scopes` lists the permissions granted directly to the agent, which has no API key of its own.",
      "required": [
        "uuid",
        "name",
        "status",
        "is_active",
        "scopes",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "created_at": {
          "type": "string",
          "description": "RFC 3339 creation timestamp."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description of the agent, omitted when none was set."
        },
        "is_active": {
          "type": "boolean",
          "description": "Whether the agent can currently authenticate."
        },
        "name": {
          "type": "string",
          "description": "Display name of the agent."
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Scopes granted to the agent."
        },
        "status": {
          "type": "string",
          "description": "Status of the agent: `\"active\"` or `\"revoked\"`."
        },
        "updated_at": {
          "type": "string",
          "description": "RFC 3339 timestamp of the last change."
        },
        "uuid": {
          "type": "string",
          "description": "Public UUID of the agent."
        }
      }
    }
  }
}