{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/supermailos-com/json-schema/supermailos-com-agent-inbox-schema.json",
  "title": "AgentInbox",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/supermailos-com-openapi.json#/components/schemas/AgentInbox",
  "type": "object",
  "required": [
    "id",
    "address",
    "name",
    "status",
    "sponsor",
    "sendMode",
    "inboundMode",
    "dailySendCap",
    "newRecipientsDailyCap",
    "allowSenders",
    "blockSenders",
    "allowRecipients",
    "disclosure",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Also its mailbox id: pass it as `mailbox` to the mail endpoints."
    },
    "address": {
      "type": "string",
      "format": "email"
    },
    "name": {
      "type": "string",
      "description": "What the agent is called; it signs its mail with it."
    },
    "description": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused"
      ]
    },
    "paused": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "by": {
          "type": "string",
          "enum": [
            "system",
            "person"
          ]
        },
        "since": {
          "type": "string",
          "format": "date-time"
        },
        "until": {
          "type": "string",
          "format": "date-time",
          "description": "Absent: until a person resumes it."
        }
      }
    },
    "sponsor": {
      "type": [
        "object",
        "null"
      ],
      "description": "The person who answers for the agent: approvals and alerts go to them.",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        }
      }
    },
    "sendMode": {
      "type": "string",
      "enum": [
        "approval",
        "known",
        "open"
      ]
    },
    "inboundMode": {
      "type": "string",
      "enum": [
        "all",
        "verified",
        "allowlist"
      ]
    },
    "dailySendCap": {
      "type": "integer"
    },
    "newRecipientsDailyCap": {
      "type": "integer"
    },
    "allowSenders": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Addresses or `@domains` the agent may read in `allowlist` mode."
    },
    "blockSenders": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Never shown to the agent."
    },
    "allowRecipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The agent may write to these without approval."
    },
    "disclosure": {
      "type": "boolean",
      "description": "Its mail ends with a line saying an AI agent sent it, for whom."
    },
    "createdVia": {
      "type": "string",
      "enum": [
        "app",
        "api",
        "mcp"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "pendingApprovals": {
      "type": "integer",
      "description": "Emails waiting for a person (people's keys only)."
    }
  }
}