{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pricklymails-com/json-schema/pricklymails-com-agent-created-response-schema.json",
  "title": "AgentCreatedResponse",
  "description": "`POST /api/agents` response body.\nAn agent has no API key, so no secret is returned.",
  "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/AgentCreatedResponse",
  "type": "object",
  "required": [
    "agent"
  ],
  "properties": {
    "agent": {
      "$ref": "#/$defs/AgentResponse",
      "description": "The new agent, including the scopes just granted to it."
    }
  },
  "$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."
        }
      }
    }
  }
}