{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/machineinbox-com/json-schema/machineinbox-com-create-inbox-response-schema.json",
  "title": "CreateInboxResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/machineinbox-com-openapi.json#/components/schemas/CreateInboxResponse",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "inbox": {
      "$ref": "#/$defs/Mailbox"
    },
    "token": {
      "type": "string",
      "pattern": "^mi_live_[A-Za-z0-9_-]+$",
      "description": "Returned only on creation or an idempotent replay."
    },
    "tokenNotice": {
      "type": "string"
    },
    "replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "inbox",
    "token",
    "tokenNotice",
    "replayed"
  ],
  "$defs": {
    "Mailbox": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "address": {
          "type": "string",
          "format": "email"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending_payment",
            "active",
            "deleted",
            "expired",
            "suspended",
            "payment_failed"
          ]
        },
        "product": {
          "type": "string",
          "enum": [
            "seven_day_inbox",
            "pro_inbox",
            "verification_inbox"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "limits": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "messages": {
              "type": "integer",
              "minimum": 1
            },
            "storageBytes": {
              "type": "integer",
              "minimum": 1
            }
          },
          "required": [
            "messages",
            "storageBytes"
          ]
        },
        "usage": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "messages": {
              "type": "integer",
              "minimum": 0
            },
            "storageBytes": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": [
            "messages",
            "storageBytes"
          ]
        }
      },
      "required": [
        "id",
        "address",
        "status",
        "product",
        "createdAt",
        "expiresAt",
        "limits",
        "usage"
      ]
    }
  }
}