{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sentfrom-ai/json-schema/sentfrom-ai-agent-signup-response-schema.json",
  "title": "AgentSignupResponse",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sentfrom-ai-openapi.json#/components/schemas/AgentSignupResponse",
  "type": "object",
  "properties": {
    "tenant_id": {
      "type": "string"
    },
    "inbox": {
      "$ref": "#/$defs/AccountInbox"
    },
    "api_key": {
      "type": "string",
      "format": "password",
      "description": "Save privately before proceeding. Bearer credential for this tenant; unchanged across signup replays and claiming."
    },
    "onboarding_state": {
      "type": "string",
      "const": "unclaimed"
    },
    "capabilities": {
      "$ref": "#/$defs/AccountCapabilities"
    },
    "limits": {
      "$ref": "#/$defs/AccountLimits"
    },
    "unclaimed_expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Account expiry unless claimed, seven days by default."
    },
    "claim_url": {
      "type": "string",
      "format": "uri",
      "description": "Private console claim URL, with a separate bearer secret in the #token fragment. Share only with the operator in an existing trusted channel; never log or email it."
    },
    "claim_expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Link expiry, default 30 minutes, bounded by account expiry. A new link does not extend account lifetime."
    },
    "instructions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "tenant_id",
    "inbox",
    "api_key",
    "onboarding_state",
    "capabilities",
    "limits",
    "unclaimed_expires_at",
    "claim_url",
    "claim_expires_at",
    "instructions"
  ],
  "$defs": {
    "AccountCapabilities": {
      "type": "object",
      "properties": {
        "receive": {
          "type": "boolean",
          "description": "Account may receive, subject to quotas and message limits."
        },
        "read": {
          "type": "boolean",
          "description": "Account may read its existing inbox and mail."
        },
        "send": {
          "type": "boolean",
          "description": "Account ownership and sending status permit sending. False while paused. Plan, warming, suppression and abuse checks still apply."
        },
        "manage": {
          "type": "boolean",
          "description": "Ownership permits resource mutations; plan limits still apply. Unclaimed accounts may only refresh claim links."
        }
      },
      "required": [
        "receive",
        "read",
        "send",
        "manage"
      ]
    },
    "AccountInbox": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "format": "email"
        }
      },
      "required": [
        "id",
        "address"
      ]
    },
    "AccountLimits": {
      "type": "object",
      "properties": {
        "inboxes": {
          "type": "integer",
          "minimum": 1,
          "description": "Inbox cap. One while unclaimed; plan-specific after claim."
        },
        "received_messages": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "description": "Cumulative unclaimed inbound message cap, default 50. Null means no onboarding-specific cap; plan limits still apply."
        },
        "received_bytes": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "description": "Cumulative unclaimed inbound byte cap, default 10485760 (10 MiB). Null after claim; plan limits still apply."
        }
      },
      "required": [
        "inboxes",
        "received_messages",
        "received_bytes"
      ]
    }
  }
}