{
  "openapi": "3.1.0",
  "info": {
    "title": "MailIndia API",
    "version": "1.0.0",
    "summary": "Disposable email over HTTP",
    "description": "MailIndia mints throwaway mailbox addresses on your own domain, receives mail\nwith Cloudflare Email Routing, and serves it through a stateless REST API.\n\n**Auth model.** A mailbox is addressed by its email address, so every scoped\ncall must present the bearer token returned by `POST /v1/mailboxes`. The token\nis an HMAC of the address, which means the API holds no session state and the\nsame address always resolves to the same token. `mik_…` API keys are for\nserver-to-server access across all mailboxes.\n\n**Retention.** Messages carry a TTL (default 3600s, 60s–24h) and are swept by\nthe owning Durable Object. Nothing is archived unless MongoDB is configured,\nin which case only key and mailbox metadata persist — never message bodies.\n\n**Limits.** 60 req/min anonymous, 600 req/min per API key, 10 mailbox mints per\nminute per IP. Raw messages are capped at 2 MB and 100 messages per mailbox.",
    "contact": {
      "name": "MailIndia",
      "url": "http://localhost:8790/docs"
    },
    "license": {
      "name": "MIT"
    }
  },
  "servers": [
    {
      "url": "http://localhost:8790",
      "description": "This deployment"
    }
  ],
  "security": [
    {
      "mailboxToken": []
    }
  ],
  "tags": [
    {
      "name": "meta",
      "description": "Discovery, health, schema"
    },
    {
      "name": "mailboxes",
      "description": "Mint, inspect, purge"
    },
    {
      "name": "messages",
      "description": "Read, delete, download"
    },
    {
      "name": "streaming",
      "description": "SSE and polling"
    },
    {
      "name": "keys",
      "description": "Server-to-server credentials (admin)"
    },
    {
      "name": "dev",
      "description": "Synthetic delivery for demos"
    }
  ],
  "paths": {
    "/v1": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Endpoint index",
        "security": [],
        "responses": {
          "200": {
            "description": "Map of every public path"
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Liveness and backend wiring",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Health"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/domains": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Accepted domains",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Domain"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/openapi.json": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "This document",
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document"
          }
        }
      }
    },
    "/v1/mailboxes": {
      "post": {
        "tags": [
          "mailboxes"
        ],
        "summary": "Mint a mailbox",
        "description": "Leave the body empty for a random address. The bearer token is returned here once.",
        "security": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Must be one of /v1/domains."
                  },
                  "address": {
                    "type": "string",
                    "description": "Claim a specific vanity address."
                  },
                  "ttlSeconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 86400,
                    "default": 3600
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Mailbox created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Mailbox"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unknown or malformed domain/address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "mint rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{address}": {
      "parameters": [
        {
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Full mailbox address, e.g. `saffron.momo417@mailindia.example.com`.",
          "schema": {
            "type": "string",
            "format": "email"
          }
        }
      ],
      "get": {
        "tags": [
          "mailboxes"
        ],
        "summary": "Mailbox counters",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MailboxStats"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "missing or wrong bearer token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "no such mailbox",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "mailboxes"
        ],
        "summary": "Purge every message",
        "description": "Deletes all messages now; the mailbox itself keeps receiving mail.",
        "responses": {
          "200": {
            "description": "Purged",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Mailbox"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "missing or wrong bearer token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{address}/messages": {
      "parameters": [
        {
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Full mailbox address, e.g. `saffron.momo417@mailindia.example.com`.",
          "schema": {
            "type": "string",
            "format": "email"
          }
        }
      ],
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "List messages, newest first",
        "description": "Cursor pagination: pass `cursor` from the previous `nextCursor`.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "receivedAt timestamp to page before.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "includeExpired",
            "in": "query",
            "description": "Include messages past their TTL but not yet swept.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of messages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MessageSummary"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "unread": {
                          "type": "integer"
                        },
                        "nextCursor": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "missing or wrong bearer token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{address}/messages/{id}": {
      "parameters": [
        {
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Full mailbox address, e.g. `saffron.momo417@mailindia.example.com`.",
          "schema": {
            "type": "string",
            "format": "email"
          }
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Full decoded message",
        "description": "Marks the message seen. `html` is verbatim MIME — render it sandboxed.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "no such message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "messages"
        ],
        "summary": "Delete one message",
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "404": {
            "description": "no such message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{address}/messages/{id}/seen": {
      "parameters": [
        {
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Full mailbox address, e.g. `saffron.momo417@mailindia.example.com`.",
          "schema": {
            "type": "string",
            "format": "email"
          }
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "messages"
        ],
        "summary": "Mark a message read",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MessageSummary"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "no such message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{address}/messages/{id}/eml": {
      "parameters": [
        {
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Full mailbox address, e.g. `saffron.momo417@mailindia.example.com`.",
          "schema": {
            "type": "string",
            "format": "email"
          }
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Download raw RFC822",
        "responses": {
          "200": {
            "description": "The unmodified MIME message",
            "content": {
              "message/rfc822": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "no such message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{address}/messages/{id}/attachments/{attachmentId}": {
      "parameters": [
        {
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Full mailbox address, e.g. `saffron.momo417@mailindia.example.com`.",
          "schema": {
            "type": "string",
            "format": "email"
          }
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "attachmentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Download one attachment",
        "responses": {
          "200": {
            "description": "Attachment bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "no such message or attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{address}/events": {
      "parameters": [
        {
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Full mailbox address, e.g. `saffron.momo417@mailindia.example.com`.",
          "schema": {
            "type": "string",
            "format": "email"
          }
        }
      ],
      "get": {
        "tags": [
          "streaming"
        ],
        "summary": "SSE stream of inbound mail",
        "description": [
          "Events: `message` (new), `stats` (counters, every poll), `error`, `close`.",
          "Needs the persistent Node server. Stream ends after 10 minutes; reconnect."
        ],
        "responses": {
          "200": {
            "description": "Event stream",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "missing or wrong bearer token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mailboxes/{address}/events/poll": {
      "parameters": [
        {
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Full mailbox address, e.g. `saffron.momo417@mailindia.example.com`.",
          "schema": {
            "type": "string",
            "format": "email"
          }
        }
      ],
      "get": {
        "tags": [
          "streaming"
        ],
        "summary": "Snapshot for hosts without SSE",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MessageSummary"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys": {
      "post": {
        "tags": [
          "keys"
        ],
        "summary": "Mint an API key",
        "description": "Requires `MAILINDIA_ADMIN_TOKEN` as the bearer and a configured MongoDB.",
        "security": [
          {
            "adminToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "admin"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ApiKey"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "wrong admin token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "mongo or admin token missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "keys"
        ],
        "summary": "List API keys",
        "security": [
          {
            "adminToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiKey"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "delete": {
        "tags": [
          "keys"
        ],
        "summary": "Revoke an API key",
        "security": [
          {
            "adminToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ApiKey"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "no such key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dev/inject": {
      "post": {
        "tags": [
          "dev"
        ],
        "summary": "Deliver a synthetic message",
        "description": "Disabled in production unless `ALLOW_DEV_INJECT=1`. Needs the mailbox token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "address"
                ],
                "properties": {
                  "address": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "html": {
                    "type": "string",
                    "nullable": true
                  },
                  "from": {
                    "type": "string"
                  },
                  "ttlSeconds": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Delivered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "missing or wrong bearer token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "mailboxToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "The `mi_…` token from POST /v1/mailboxes for this mailbox."
      },
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A `mik_…` server-to-server key; valid across all mailboxes."
      },
      "adminToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "The value of MAILINDIA_ADMIN_TOKEN; key management only."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "status"
            ],
            "properties": {
              "code": {
                "type": "string",
                "examples": [
                  "unauthorized",
                  "message_not_found",
                  "rate_limited"
                ]
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "integer"
              },
              "details": {}
            }
          }
        }
      },
      "Domain": {
        "type": "object",
        "required": [
          "domain",
          "primary",
          "acceptsMail",
          "messageTtlSeconds"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "examples": [
              "mailindia.example.com"
            ]
          },
          "primary": {
            "type": "boolean"
          },
          "acceptsMail": {
            "type": "boolean"
          },
          "messageTtlSeconds": {
            "type": "integer",
            "examples": [
              3600
            ]
          }
        }
      },
      "Mailbox": {
        "type": "object",
        "required": [
          "address",
          "token",
          "ttlSeconds",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "address": {
            "type": "string",
            "examples": [
              "saffron.momo417@mailindia.example.com"
            ]
          },
          "domain": {
            "type": "string"
          },
          "localPart": {
            "type": "string",
            "examples": [
              "saffron.momo417"
            ]
          },
          "token": {
            "type": "string",
            "description": "Bearer token proving possession of the mailbox."
          },
          "ttlSeconds": {
            "type": "integer"
          },
          "createdAt": {
            "type": "integer",
            "format": "int64"
          },
          "expiresAt": {
            "type": "integer",
            "format": "int64"
          },
          "deleted": {
            "type": "integer",
            "description": "Messages removed by a purge."
          }
        }
      },
      "MailboxStats": {
        "type": "object",
        "required": [
          "address",
          "createdAt",
          "total",
          "unread",
          "bytes"
        ],
        "properties": {
          "address": {
            "type": "string"
          },
          "createdAt": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer"
          },
          "unread": {
            "type": "integer"
          },
          "bytes": {
            "type": "integer"
          },
          "latestMessageAt": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "nextExpiryAt": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "token": {
            "type": "string"
          },
          "ttlSeconds": {
            "type": "integer"
          }
        }
      },
      "MessageSummary": {
        "type": "object",
        "required": [
          "id",
          "subject",
          "from",
          "to",
          "receivedAt",
          "expiresAt",
          "size",
          "seen"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "messageId": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC822 Message-ID header."
          },
          "subject": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "format": "email"
          },
          "fromName": {
            "type": "string"
          },
          "to": {
            "type": "string",
            "format": "email"
          },
          "receivedAt": {
            "type": "integer",
            "format": "int64"
          },
          "expiresAt": {
            "type": "integer",
            "format": "int64"
          },
          "size": {
            "type": "integer",
            "description": "Raw MIME bytes."
          },
          "seen": {
            "type": "boolean"
          },
          "contentType": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Absolute URL of the message resource."
          }
        }
      },
      "Attachment": {
        "type": "object",
        "required": [
          "id",
          "filename",
          "contentType",
          "size",
          "inline",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "inline": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "Message": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MessageSummary"
          },
          {
            "type": "object",
            "properties": {
              "body": {
                "type": "string",
                "description": "Decoded plain-text part."
              },
              "html": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Raw HTML part. Render only inside a sandboxed frame."
              },
              "from": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "to": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "cc": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "replyTo": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "attachments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Attachment"
                }
              },
              "seenAt": {
                "type": "integer",
                "format": "int64"
              },
              "expiresInSeconds": {
                "type": "integer"
              }
            }
          }
        ]
      },
      "ApiKey": {
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "scopes"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "examples": [
              "mik_4f2a9c1b"
            ]
          },
          "key": {
            "type": "string",
            "description": "Returned once at creation time only."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "admin"
              ]
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "requestCount": {
            "type": "integer"
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "status",
          "version",
          "store",
          "domains"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded"
            ]
          },
          "version": {
            "type": "string"
          },
          "time": {
            "type": "integer",
            "format": "int64"
          },
          "env": {
            "type": "string"
          },
          "store": {
            "type": "string",
            "enum": [
              "durable",
              "memory"
            ]
          },
          "mx": {
            "type": "object"
          },
          "mongo": {
            "type": "string",
            "enum": [
              "connected",
              "disabled"
            ]
          },
          "domains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Domain"
            }
          },
          "limits": {
            "type": "object"
          }
        }
      }
    }
  }
}
