{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cherami-to/json-schema/cherami-to-inbox-list-schema.json",
  "title": "InboxList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cherami-to-inboxes-api-openapi.yml#/components/schemas/InboxList",
  "type": "object",
  "properties": {
    "inboxes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Inbox"
      }
    },
    "inbox_limit": {
      "type": "integer",
      "minimum": 0,
      "description": "Most inboxes the account can have; the same as inbox_allowance.allowance."
    },
    "inbox_allowance": {
      "$ref": "#/$defs/InboxAllowance"
    }
  },
  "required": [
    "inboxes",
    "inbox_limit",
    "inbox_allowance"
  ],
  "$defs": {
    "Inbox": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Cherami resource ID."
        },
        "local_part": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "sender_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "description": "UTC timestamp with milliseconds.",
          "format": "date-time",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
        }
      },
      "required": [
        "id",
        "local_part",
        "address",
        "name",
        "sender_name",
        "created_at"
      ]
    },
    "InboxAllowance": {
      "type": "object",
      "properties": {
        "allowance": {
          "type": "integer",
          "minimum": 0
        },
        "used": {
          "type": "integer",
          "minimum": 0
        },
        "remaining": {
          "type": "integer",
          "minimum": 0
        },
        "unit": {
          "const": "inbox_slots"
        }
      },
      "required": [
        "allowance",
        "used",
        "remaining",
        "unit"
      ]
    }
  }
}