{
  "openapi": "3.1.0",
  "info": {
    "title": "Galon Cloud API",
    "version": "1.0.0",
    "description": "Multi-tenant API for projects, asynchronous jobs, artefacts and webhooks."
  },
  "servers": [
    {
      "url": "https://api.galon.ai/v1"
    }
  ],
  "tags": [
    {
      "name": "Tools"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Jobs"
    },
    {
      "name": "Builds"
    },
    {
      "name": "Mail"
    },
    {
      "name": "Domains"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "Billing"
    },
    {
      "name": "Usage"
    },
    {
      "name": "Storage"
    },
    {
      "name": "AI"
    },
    {
      "name": "Deploy"
    },
    {
      "name": "Geo"
    },
    {
      "name": "Search",
      "description": "Galon Search — read web pages and sites for your AI (scrape, map, crawl). Key scope search:query."
    },
    {
      "name": "Compute",
      "description": "Galon Compute — operations served by API key while the service is open to the account (404 otherwise)."
    },
    {
      "name": "Functions",
      "description": "Galon Functions — operations served by API key while the service is open to the account (404 otherwise)."
    },
    {
      "name": "Backend",
      "description": "Galon Backend — operations served by API key while the service is open to the account (404 otherwise)."
    }
  ],
  "x-galon-sdk-routes": [
    {
      "resource": "emails",
      "method": "send",
      "http": "POST",
      "path": "/emails",
      "body": true,
      "beta": null
    },
    {
      "resource": "emails",
      "method": "get",
      "http": "GET",
      "path": "/emails/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "emails",
      "method": "list",
      "http": "GET",
      "path": "/emails",
      "body": false,
      "beta": null
    },
    {
      "resource": "emails",
      "method": "metrics",
      "http": "GET",
      "path": "/emails/metrics",
      "body": false,
      "beta": null
    },
    {
      "resource": "emails",
      "method": "update",
      "http": "PATCH",
      "path": "/emails/{id}",
      "body": true,
      "beta": null
    },
    {
      "resource": "emails",
      "method": "cancel",
      "http": "POST",
      "path": "/emails/{id}/cancel",
      "body": false,
      "beta": null
    },
    {
      "resource": "batch",
      "method": "send",
      "http": "POST",
      "path": "/emails/batch",
      "body": true,
      "beta": null
    },
    {
      "resource": "jobs",
      "method": "create",
      "http": "POST",
      "path": "/jobs",
      "body": true,
      "beta": null
    },
    {
      "resource": "jobs",
      "method": "get",
      "http": "GET",
      "path": "/jobs/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "jobs",
      "method": "cancel",
      "http": "POST",
      "path": "/jobs/{id}/cancel",
      "body": false,
      "beta": null
    },
    {
      "resource": "tools",
      "method": "get",
      "http": "GET",
      "path": "/tools",
      "body": false,
      "beta": null
    },
    {
      "resource": "costs",
      "method": "get",
      "http": "GET",
      "path": "/costs",
      "body": false,
      "beta": null
    },
    {
      "resource": "metering",
      "method": "get",
      "http": "GET",
      "path": "/metering",
      "body": false,
      "beta": null
    },
    {
      "resource": "limits",
      "method": "get",
      "http": "GET",
      "path": "/limits",
      "body": false,
      "beta": null
    },
    {
      "resource": "builds",
      "method": "create",
      "http": "POST",
      "path": "/builds",
      "body": true,
      "beta": null
    },
    {
      "resource": "builds",
      "method": "get",
      "http": "GET",
      "path": "/builds/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "builds",
      "method": "cancel",
      "http": "POST",
      "path": "/builds/{id}/cancel",
      "body": false,
      "beta": null
    },
    {
      "resource": "artifacts",
      "method": "list",
      "http": "GET",
      "path": "/builds/{id}/artifacts",
      "body": false,
      "beta": null
    },
    {
      "resource": "domains",
      "method": "create",
      "http": "POST",
      "path": "/domains",
      "body": true,
      "beta": null
    },
    {
      "resource": "domains",
      "method": "list",
      "http": "GET",
      "path": "/domains",
      "body": false,
      "beta": null
    },
    {
      "resource": "domains",
      "method": "get",
      "http": "GET",
      "path": "/domains/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "domains",
      "method": "verify",
      "http": "POST",
      "path": "/domains/{id}/verify",
      "body": false,
      "beta": null
    },
    {
      "resource": "domains",
      "method": "update",
      "http": "PATCH",
      "path": "/domains/{id}",
      "body": true,
      "beta": null
    },
    {
      "resource": "domains",
      "method": "remove",
      "http": "DELETE",
      "path": "/domains/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "templates",
      "method": "create",
      "http": "POST",
      "path": "/templates",
      "body": true,
      "beta": null
    },
    {
      "resource": "templates",
      "method": "list",
      "http": "GET",
      "path": "/templates",
      "body": false,
      "beta": null
    },
    {
      "resource": "templates",
      "method": "get",
      "http": "GET",
      "path": "/templates/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "templates",
      "method": "update",
      "http": "PATCH",
      "path": "/templates/{id}",
      "body": true,
      "beta": null
    },
    {
      "resource": "templates",
      "method": "publish",
      "http": "POST",
      "path": "/templates/{id}/publish",
      "body": false,
      "beta": null
    },
    {
      "resource": "templates",
      "method": "duplicate",
      "http": "POST",
      "path": "/templates/{id}/duplicate",
      "body": false,
      "beta": null
    },
    {
      "resource": "templates",
      "method": "remove",
      "http": "DELETE",
      "path": "/templates/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "suppressions",
      "method": "create",
      "http": "POST",
      "path": "/suppressions",
      "body": true,
      "beta": null
    },
    {
      "resource": "suppressions",
      "method": "list",
      "http": "GET",
      "path": "/suppressions",
      "body": false,
      "beta": null
    },
    {
      "resource": "suppressions",
      "method": "remove",
      "http": "DELETE",
      "path": "/suppressions/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "receivedEmails",
      "method": "list",
      "http": "GET",
      "path": "/received-emails",
      "body": false,
      "beta": null
    },
    {
      "resource": "receivedEmails",
      "method": "get",
      "http": "GET",
      "path": "/received-emails/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "receivedEmails",
      "method": "attachments",
      "http": "GET",
      "path": "/received-emails/{id}/attachments",
      "body": false,
      "beta": null
    },
    {
      "resource": "receivedEmails",
      "method": "forward",
      "http": "POST",
      "path": "/received-emails/{id}/forward",
      "body": true,
      "beta": null
    },
    {
      "resource": "receivingDomains",
      "method": "create",
      "http": "POST",
      "path": "/receiving-domains",
      "body": true,
      "beta": null
    },
    {
      "resource": "receivingDomains",
      "method": "list",
      "http": "GET",
      "path": "/receiving-domains",
      "body": false,
      "beta": null
    },
    {
      "resource": "receivingDomains",
      "method": "get",
      "http": "GET",
      "path": "/receiving-domains/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "receivingDomains",
      "method": "update",
      "http": "PATCH",
      "path": "/receiving-domains/{id}",
      "body": true,
      "beta": null
    },
    {
      "resource": "receivingDomains",
      "method": "remove",
      "http": "DELETE",
      "path": "/receiving-domains/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "receivingDomains",
      "method": "rules",
      "http": "GET",
      "path": "/receiving-domains/{id}/rules",
      "body": false,
      "beta": null
    },
    {
      "resource": "receivingDomains",
      "method": "createRule",
      "http": "POST",
      "path": "/receiving-domains/{id}/rules",
      "body": true,
      "beta": null
    },
    {
      "resource": "ai",
      "method": "chat",
      "http": "POST",
      "path": "/ai/chat/completions",
      "body": true,
      "beta": null
    },
    {
      "resource": "ai",
      "method": "models",
      "http": "GET",
      "path": "/ai/models",
      "body": false,
      "beta": null
    },
    {
      "resource": "ai",
      "method": "embeddings",
      "http": "POST",
      "path": "/ai/embeddings",
      "body": true,
      "beta": null
    },
    {
      "resource": "buckets",
      "method": "create",
      "http": "POST",
      "path": "/storage/buckets",
      "body": true,
      "beta": null
    },
    {
      "resource": "buckets",
      "method": "list",
      "http": "GET",
      "path": "/storage/buckets",
      "body": false,
      "beta": null
    },
    {
      "resource": "buckets",
      "method": "get",
      "http": "GET",
      "path": "/storage/buckets/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "buckets",
      "method": "objects",
      "http": "GET",
      "path": "/storage/buckets/{id}/objects",
      "body": false,
      "beta": null
    },
    {
      "resource": "buckets",
      "method": "upload",
      "http": "POST",
      "path": "/storage/buckets/{id}/uploads",
      "body": true,
      "beta": null
    },
    {
      "resource": "buckets",
      "method": "access",
      "http": "GET",
      "path": "/storage/buckets/{id}/access",
      "body": false,
      "beta": null
    },
    {
      "resource": "buckets",
      "method": "setAccess",
      "http": "PUT",
      "path": "/storage/buckets/{id}/access",
      "body": true,
      "beta": null
    },
    {
      "resource": "uploads",
      "method": "commit",
      "http": "POST",
      "path": "/storage/uploads/{id}/commit",
      "body": false,
      "beta": null
    },
    {
      "resource": "objects",
      "method": "get",
      "http": "GET",
      "path": "/storage/objects/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "objects",
      "method": "remove",
      "http": "DELETE",
      "path": "/storage/objects/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "objects",
      "method": "versions",
      "http": "GET",
      "path": "/storage/objects/{id}/versions",
      "body": false,
      "beta": null
    },
    {
      "resource": "objects",
      "method": "restore",
      "http": "POST",
      "path": "/storage/objects/{id}/restore",
      "body": false,
      "beta": null
    },
    {
      "resource": "objects",
      "method": "link",
      "http": "POST",
      "path": "/storage/objects/{id}/links",
      "body": true,
      "beta": null
    },
    {
      "resource": "storage",
      "method": "usage",
      "http": "GET",
      "path": "/storage/usage",
      "body": false,
      "beta": null
    },
    {
      "resource": "storage",
      "method": "usageHistory",
      "http": "GET",
      "path": "/storage/usage/history",
      "body": false,
      "beta": null
    },
    {
      "resource": "storage",
      "method": "tier",
      "http": "GET",
      "path": "/storage/tier",
      "body": false,
      "beta": null
    },
    {
      "resource": "storage",
      "method": "changeTier",
      "http": "PUT",
      "path": "/storage/tier",
      "body": true,
      "beta": null
    },
    {
      "resource": "deployments",
      "method": "create",
      "http": "POST",
      "path": "/deploy/journeys",
      "body": true,
      "beta": null
    },
    {
      "resource": "deployments",
      "method": "list",
      "http": "GET",
      "path": "/deploy/journeys",
      "body": false,
      "beta": null
    },
    {
      "resource": "deployments",
      "method": "get",
      "http": "GET",
      "path": "/deploy/journeys/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "deployments",
      "method": "resume",
      "http": "POST",
      "path": "/deploy/journeys/{id}/resume",
      "body": false,
      "beta": null
    },
    {
      "resource": "deployments",
      "method": "buildLogs",
      "http": "GET",
      "path": "/deploy/journeys/{id}/build-logs",
      "body": false,
      "beta": null
    },
    {
      "resource": "deploy",
      "method": "runtimeLogs",
      "http": "GET",
      "path": "/deploy/runtime/{id}/logs",
      "body": false,
      "beta": null
    },
    {
      "resource": "deploy",
      "method": "env",
      "http": "GET",
      "path": "/deploy/env",
      "body": false,
      "beta": null
    },
    {
      "resource": "production",
      "method": "plans",
      "http": "GET",
      "path": "/deploy/production/plans",
      "body": false,
      "beta": null
    },
    {
      "resource": "production",
      "method": "status",
      "http": "GET",
      "path": "/deploy/production/status",
      "body": false,
      "beta": null
    },
    {
      "resource": "production",
      "method": "choosePlan",
      "http": "POST",
      "path": "/deploy/production/plan",
      "body": true,
      "beta": null
    },
    {
      "resource": "production",
      "method": "addDomain",
      "http": "POST",
      "path": "/deploy/production/domains",
      "body": true,
      "beta": null
    },
    {
      "resource": "production",
      "method": "verifyDomain",
      "http": "POST",
      "path": "/deploy/production/domains/{id}/verify",
      "body": false,
      "beta": null
    },
    {
      "resource": "production",
      "method": "removeDomain",
      "http": "DELETE",
      "path": "/deploy/production/domains/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "production",
      "method": "promote",
      "http": "POST",
      "path": "/deploy/production/promote",
      "body": true,
      "beta": null
    },
    {
      "resource": "production",
      "method": "rollback",
      "http": "POST",
      "path": "/deploy/production/rollback",
      "body": false,
      "beta": null
    },
    {
      "resource": "search",
      "method": "scrape",
      "http": "POST",
      "path": "/search/v2/scrape",
      "body": true,
      "beta": null
    },
    {
      "resource": "search",
      "method": "map",
      "http": "POST",
      "path": "/search/v2/map",
      "body": true,
      "beta": null
    },
    {
      "resource": "search",
      "method": "startCrawl",
      "http": "POST",
      "path": "/search/v2/crawl",
      "body": true,
      "beta": null
    },
    {
      "resource": "search",
      "method": "getCrawl",
      "http": "GET",
      "path": "/search/v2/crawl/{id}",
      "body": false,
      "beta": null
    },
    {
      "resource": "search",
      "method": "getCrawlErrors",
      "http": "GET",
      "path": "/search/v2/crawl/{id}/errors",
      "body": false,
      "beta": null
    },
    {
      "resource": "search",
      "method": "cancelCrawl",
      "http": "DELETE",
      "path": "/search/v2/crawl/{id}",
      "body": false,
      "beta": null
    }
  ],
  "paths": {
    "/projects/{project_id}/storage/buckets": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — List the project's buckets",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. Hidden surface: 404 not_found until the Galon Object opt-in is enabled.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page of buckets, signed cursor",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucketPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "query_invalid, storage_page_limit_invalid, storage_cursor_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — Create a bucket",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. 201 on creation, 200 on replay of the same Idempotency-Key. Hidden surface: 404 not_found until the Galon Object opt-in is enabled.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageBucketCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Bucket created",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucketReceipt"
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucketReceipt"
                }
              }
            }
          },
          "400": {
            "description": "body_fields_invalid, body_invalid, storage_idempotency_key_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "storage_idempotency_conflict, storage_bucket_exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "content_type_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid, storage_bucket_name_invalid, storage_placement_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "storage_bucket_quota_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable, storage_operation_indeterminate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/storage/buckets/{bucket_id}": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — Get a bucket",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. Hidden surface: 404 not_found until the Galon Object opt-in is enabled.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "bucket_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^bkt_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bucket",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucket"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), storage_bucket_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/storage/buckets/{bucket_id}/uploads": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — Start a direct upload (begin)",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. Reserves the object key and the quota, then returns a create-only PUT capability valid for 60 to 300 seconds: the client sends the bytes to capability.url with exactly the capability.headers headers (Content-Length, If-None-Match: *, X-Galon-Checksum-Sha256). 201 on creation, 200 on replay of the same Idempotency-Key (same upload, new capability, no second quota; capability=null and commit populated if the upload is already committed). Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "bucket_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^bkt_[0-9a-f]{32}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageUploadCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload reserved and upload capability",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUploadReceipt"
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUploadReceipt"
                }
              }
            }
          },
          "400": {
            "description": "storage_idempotency_key_invalid, body_fields_invalid, body_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), storage_bucket_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "storage_idempotency_conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "storage_precondition_failed (bucket not ready, object key already reserved, reservation too close to expiry)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "object_too_large, body_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "content_type_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid, object_key_invalid, size_bytes_invalid, storage_checksum_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "storage_bytes_quota_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "storage_contract_invalid (project quota not provisioned)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_operation_indeterminate, storage_temporarily_unavailable: replay the same Idempotency-Key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/storage/uploads/{upload_id}/commit": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — Validate an upload (commit)",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. No body. The server inspects the observed metadata: size and SHA-256 must be exactly those announced at begin. 201 when the object is created, 200 on replay. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^upl_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Object available",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUploadCommit"
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUploadCommit"
                }
              }
            }
          },
          "400": {
            "description": "body_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), storage_object_not_found (unknown upload), not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "storage_precondition_failed (nothing received, size differs)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid, storage_checksum_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_operation_indeterminate, storage_response_lost: replay the commit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/storage/buckets/{bucket_id}/objects": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — List objects in a bucket",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. Committed objects, in commit order, signed cursor bound to the project and the bucket. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "bucket_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^bkt_[0-9a-f]{32}$"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page of objects",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObjectPage"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "query_invalid, storage_page_limit_invalid, storage_cursor_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), storage_bucket_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/storage/objects/{object_id}": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — Get an object's metadata",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. Metadata only, never the content. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^obj_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Object",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObject"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), storage_object_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — Request deletion of an object",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. Idempotent, no body: 202 on the first request, 200 on subsequent ones with the same job. The object moves to 'deleting' and stays listed until purged; its volume remains counted in committed_bytes (and pending_deletion_bytes) until then. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^obj_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Deletion queued",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObjectDeletion"
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObjectDeletion"
                }
              }
            }
          },
          "400": {
            "description": "body_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), storage_object_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_operation_indeterminate: replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/storage/usage": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Console — Get the project's Storage usage",
        "description": "Galon console session: tenant from the session, project in the path verified as an active project of the tenant, project environment; admin role (a member receives 403 reserve_admin). Same control plane and same projection as the key-based route. Bytes only, no amounts; no parameters. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Project quota and counters",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUsage"
                }
              }
            }
          },
          "400": {
            "description": "query_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin (member)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "project_not_found, not_found (surface closed or tenant not admitted), ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "storage_contract_invalid (project quota not provisioned)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "project_id_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ]
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/storage/buckets": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "List buckets of the project bound to the key",
        "description": "Exact scope storage:read. Hidden surface: 404 not_found until the Galon Object opt-in is enabled.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page of buckets, signed cursor",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucketPage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:read)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "query_invalid, storage_page_limit_invalid, storage_cursor_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found (surface closed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Create a bucket",
        "description": "Exact scope storage:write. 201 on creation, 200 on replay of the same Idempotency-Key. Hidden surface: 404 not_found until the Galon Object opt-in is enabled.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageBucketCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Bucket created",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucketReceipt"
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucketReceipt"
                }
              }
            }
          },
          "400": {
            "description": "body_fields_invalid, body_invalid, storage_idempotency_key_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:write)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found (surface closed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "storage_idempotency_conflict, storage_bucket_exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "content_type_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "storage_bucket_name_invalid, storage_placement_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "storage_bucket_quota_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable, storage_operation_indeterminate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/buckets/{bucket_id}": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Get a bucket",
        "description": "Exact scope storage:read. Hidden surface: 404 not_found until the Galon Object opt-in is enabled.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "bucket_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^bkt_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bucket",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucket"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:read)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "storage_bucket_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/buckets/{bucket_id}/uploads": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Start a direct upload (begin)",
        "description": "Exact scope storage:write. Reserves the object key and the quota, then returns a create-only PUT capability valid for 60 to 300 seconds: the client sends the bytes to capability.url with exactly the capability.headers headers (Content-Length, If-None-Match: *, X-Galon-Checksum-Sha256). 201 on creation, 200 on replay of the same Idempotency-Key (same upload, new capability, no second quota; capability=null and commit populated if the upload is already committed). Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "bucket_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^bkt_[0-9a-f]{32}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageUploadCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload reserved and upload capability",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUploadReceipt"
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUploadReceipt"
                }
              }
            }
          },
          "400": {
            "description": "storage_idempotency_key_invalid, body_fields_invalid, body_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:write)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "storage_bucket_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "storage_idempotency_conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "storage_precondition_failed (bucket not ready, object key already reserved, reservation too close to expiry)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "object_too_large, body_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "content_type_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "object_key_invalid, size_bytes_invalid, storage_checksum_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "storage_bytes_quota_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "storage_contract_invalid (project quota not provisioned)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_operation_indeterminate, storage_temporarily_unavailable: replay the same Idempotency-Key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/uploads/{upload_id}/commit": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Validate an upload (commit)",
        "description": "Exact scope storage:write. No body. The server inspects the observed metadata: size and SHA-256 must be exactly those announced at begin. 201 when the object is created, 200 on replay. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^upl_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Object available",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUploadCommit"
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUploadCommit"
                }
              }
            }
          },
          "400": {
            "description": "body_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:write)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "storage_object_not_found (unknown upload), not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "storage_precondition_failed (nothing received, size differs)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "storage_checksum_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_operation_indeterminate, storage_response_lost: replay the commit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/buckets/{bucket_id}/objects": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "List objects in a bucket",
        "description": "Exact scope storage:read. Committed objects, in commit order, signed cursor bound to the project and the bucket. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "bucket_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^bkt_[0-9a-f]{32}$"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page of objects",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObjectPage"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:read)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "query_invalid, storage_page_limit_invalid, storage_cursor_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "storage_bucket_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/objects/{object_id}": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Get an object's metadata",
        "description": "Exact scope storage:read. Metadata only, never the content. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^obj_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Object",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObject"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:read)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "storage_object_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Storage"
        ],
        "summary": "Request deletion of an object",
        "description": "Exact scope storage:write. Idempotent, no body: 202 on the first request, 200 on subsequent ones with the same job. The object moves to 'deleting' and stays listed until purged; its volume remains counted in committed_bytes (and pending_deletion_bytes) until then. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^obj_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Deletion queued",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObjectDeletion"
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObjectDeletion"
                }
              }
            }
          },
          "400": {
            "description": "body_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:write)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "storage_object_not_found, not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_operation_indeterminate: replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/usage": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Get Storage usage of the project bound to the key",
        "description": "Exact scope storage:read. Bytes only, no amounts; no parameters. Hidden surface: 404 not_found until the Galon Object opt-in is enabled and a qualified data plane is injected. No bytes pass through the API; no internal reference or provider name is returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Project quota and counters",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUsage"
                }
              }
            }
          },
          "400": {
            "description": "query_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (storage:read)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found (surface closed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "storage_contract_invalid (project quota not provisioned)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "storage_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tools": {
      "get": {
        "tags": [
          "Tools"
        ],
        "summary": "List tools authorised by the key",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Catalogue limited to the project, the environment, the scopes and the capabilities actually open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolCatalogResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/costs": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Get the recognised monthly spend of the project bound to the key",
        "description": "Exact scope usage:read. Measures active subscriptions in USD cents; on-demand usage remains explicitly not_measured. No provider cost or payment identifier is returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Partial spend projection and explicit coverage",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCosts"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (usage:read)"
          },
          "404": {
            "description": "project_not_found"
          },
          "503": {
            "description": "costs_unavailable"
          }
        }
      }
    },
    "/metering": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Get technical quantities recorded for the project bound to the key",
        "description": "Exact scope usage:read. Returns the month's effective meter quantities, net of corrections. This statement is neither an invoice nor a provider reconciliation; no cost, job, adapter or proof identifier is returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Technical measurements and explicit coverage",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMetering"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (usage:read)"
          },
          "404": {
            "description": "project_not_found"
          },
          "503": {
            "description": "metering_unavailable"
          }
        }
      }
    },
    "/limits": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Get limits and consumption of the project bound to the key",
        "description": "Exact scope usage:read. Returns only client limits, operations, quantities, consumed/reserved and circuit state. Provider costs and limits remain internal. This read never replaces the atomic preflight decision before execution.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public limits and explicit coverage; not_configured never means unlimited",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectLimits"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (usage:read)"
          },
          "404": {
            "description": "project_not_found"
          },
          "503": {
            "description": "limits_unavailable"
          }
        }
      }
    },
    "/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List the tenant's projects",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Projects"
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "security": [
          {
            "Session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Project created"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/free-plan": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get the public free tier contract",
        "description": "Strict, versioned Galon limits. Provider free allowances are pooled and do not constitute an infrastructure credit for the client.",
        "security": [],
        "responses": {
          "200": {
            "description": "Free contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreeTier"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/mail/plans": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get the public Galon Mail price list",
        "description": "Prices in USD cents, included volumes, active promotion and markup guard. No provider identifier is exposed.",
        "security": [],
        "responses": {
          "200": {
            "description": "Versioned price list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailPricing"
                }
              }
            }
          },
          "503": {
            "description": "Price list unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/mail/onboarding": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Load or start Galon Mail onboarding",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current step, question and quote",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Project not found"
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Reply to the onboarding assistant",
        "description": "The text is used only for a closed transition and is not persisted. Confirmation requests an activation but triggers neither payment nor sending.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailOnboardingAnswer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Onboarding updated"
          },
          "409": {
            "description": "Stale version"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/mail/checkout": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Create or resume payment for a Galon Mail product",
        "description": "The server re-reads the confirmed product and quote; the price is in US dollars, for reference; the exact amount charged is shown before payment. `payment_method` is an identifier returned by `GET /billing/payment-methods` for the billing country: a method not offered for that country is refused (422 `mail_payment_method_unavailable`). Payment releases no sending until the signed, matching confirmation of the secure payment.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailCheckout"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Existing checkout"
          },
          "201": {
            "description": "Checkout created"
          },
          "409": {
            "description": "Journey or idempotency conflict"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "description": "Payment unavailable or state to reconcile"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/mail/free": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Activate the Galon Mail free tier",
        "description": "Activates, without payment, the product chosen during onboarding. A tenant can combine Transactional Free and Marketing Free. Sending remains closed until DNS verification and activation of the production channel.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailCheckout"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Existing free entitlement"
          },
          "201": {
            "description": "Free entitlement created"
          },
          "409": {
            "description": "Version or free project conflict"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "description": "Activation unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/mail/subscription": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get the Galon Mail subscription status",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "transactional",
                "marketing"
              ],
              "default": "transactional"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped status",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MailSubscription"
                    },
                    {
                      "$ref": "#/components/schemas/MailFreeEntitlement"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No subscription"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/mail/subscriptions": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get Transactional and Marketing subscriptions",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "The two independent entitlements visible in the tenant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "schema",
                    "subscriptions"
                  ],
                  "properties": {
                    "schema": {
                      "const": "galon.mail.subscriptions.v1"
                    },
                    "subscriptions": {
                      "type": "array",
                      "maxItems": 2,
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/MailSubscription"
                          },
                          {
                            "$ref": "#/components/schemas/MailFreeEntitlement"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Billing unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/mail/subscription/cancel": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Stop renewal of a Mail product (the plan remains active until the end of the paid period)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "transactional",
                "marketing"
              ],
              "default": "transactional"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Renewal stopped (billing stopped, no refund); the plan remains active until ends_at, then the project reverts to Free",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailCancellation"
                }
              }
            }
          },
          "403": {
            "description": "Administrator required"
          },
          "404": {
            "description": "Subscription not found"
          },
          "409": {
            "description": "Cancellation refused"
          },
          "503": {
            "description": "Billing unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/terms": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Current terms of use",
        "description": "Version, language and text of the Galon Cloud / Galon Mail terms, without signing in. Language: ?language=, otherwise Accept-Language, falling back to English.",
        "parameters": [
          {
            "name": "language",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current terms (schema galon.cloud.terms.v1: version, language, text, sha256, languages)"
          },
          "503": {
            "description": "Terms unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/terms/acceptance": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Acceptance status of the current terms",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "galon.cloud.terms-acceptance.v1: version, accepted, language, accepted_at"
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Accept the current terms (two checkboxes)",
        "security": [
          {
            "Session": []
          }
        ],
        "description": "read = 'I have read', commit = 'I undertake to comply with them': two required true booleans. A new version requires a new acceptance before Mail activation and any sending.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "version",
                  "language",
                  "read",
                  "commit"
                ],
                "properties": {
                  "version": {
                    "type": "string",
                    "description": "version returned by GET /terms"
                  },
                  "language": {
                    "type": "string",
                    "pattern": "^[a-z]{2}$",
                    "description": "language of the text read"
                  },
                  "read": {
                    "type": "boolean",
                    "const": true,
                    "description": "I have read the terms"
                  },
                  "commit": {
                    "type": "boolean",
                    "const": true,
                    "description": "I undertake to comply with them"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Already accepted"
          },
          "201": {
            "description": "Acceptance recorded"
          },
          "422": {
            "description": "Missing checkbox, stale version or unknown language"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/mail/consents": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Record a recipient's marketing consent",
        "security": [
          {
            "Session": []
          }
        ],
        "description": "Without active consent, any marketing email to this recipient is refused. Only an HMAC fingerprint of the address is stored.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "email",
                  "source",
                  "consented_at",
                  "proof_reference"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "web_form",
                      "double_opt_in",
                      "checkout",
                      "account_signup",
                      "in_person",
                      "paper_form",
                      "other"
                    ]
                  },
                  "consented_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "date of consent, with time zone, never in the future"
                  },
                  "proof_reference": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._:/#@+=-]{1,200}$",
                    "description": "reference of the proof held by the client"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Consent recorded"
          },
          "422": {
            "description": "Invalid consent"
          },
          "503": {
            "description": "Register unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/mail/consents/revoke": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Revoke a marketing consent",
        "security": [
          {
            "Session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "revoked or absent"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/mail/unsubscribe/{token}": {
      "parameters": [
        {
          "name": "token",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "maxLength": 256
          }
        }
      ],
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Unsubscribe confirmation page (no sign-in)",
        "description": "Never unsubscribes: displays a POST button in the recipient's language.",
        "responses": {
          "200": {
            "description": "HTML page"
          },
          "400": {
            "description": "Invalid link"
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "One-click unsubscribe (RFC 8058)",
        "description": "List-Unsubscribe=One-Click body, without cookie or authorisation; idempotent; no redirect.",
        "responses": {
          "200": {
            "description": "Unsubscribed (HTML page)"
          },
          "400": {
            "description": "Invalid link"
          },
          "503": {
            "description": "Unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/keys": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "List metadata of the project's keys",
        "security": [
          {
            "Session": []
          }
        ],
        "description": "Never returns the secret or its fingerprint.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Manageable keys",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Project not found"
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create an API key displayed only once",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Key created",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "scope_not_available: a requested scope is closed to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopeNotAvailableError"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/keys/{key_id}/revoke": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Revoke an API key immediately",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Key revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyResponse"
                }
              }
            }
          },
          "404": {
            "description": "Key or project not found"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/jobs": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Submit a job",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Job accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobSubmissionResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency conflict"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "$ref": "#/components/responses/JobProjectionInvalid"
          }
        }
      }
    },
    "/jobs/types": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Stable job types (derived from the worker registry)",
        "description": "Public: no tenant, no data. A label is a CODE (`job_type_<type>`) translated by the console.",
        "responses": {
          "200": {
            "description": "Sorted types",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JobType"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get a job",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/jobs/{job_id}/cancel": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Cancel a job",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Job cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            }
          },
          "409": {
            "description": "Job in a terminal state"
          }
        }
      }
    },
    "/emails": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Send a transactional email",
        "description": "Creates a job for 1 to 50 recipients (to, cc, bcc; to_email is still accepted for a single one). Each recipient receives their own copy with their unsubscribe link and counts towards the quota. Base64 attachments (at most 10, executables refused); the whole message is at most 25,000,000 bytes once encoded, attachments included (about 18 MB of files), otherwise 422 email_too_large before 202; scheduled_at defers sending by at most 72 h. No public SMTP, campaign or raw message. A job success means accepted for dispatch, not delivered.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailSend"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Sending queued (scheduled_at echoed if set)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailSendResponse"
                }
              }
            }
          },
          "403": {
            "description": "Scope mail:send missing"
          },
          "409": {
            "description": "Idempotency conflict"
          },
          "413": {
            "description": "Body larger than 42 MiB"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "$ref": "#/components/responses/JobProjectionInvalid"
          }
        }
      },
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List the project's email log",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "description": "Required in a console session; ignored with an API key (the key's project).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/EmailJournalStatus"
            }
          },
          {
            "name": "created_after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "email"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Log page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailJournalListResponse"
                }
              }
            }
          },
          "403": {
            "description": "Scopes mail:send and job:read required"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "description": "mail_journal_unavailable"
          }
        }
      }
    },
    "/emails/metrics": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get daily log metrics over at most 92 days",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "description": "Required in a console session; ignored with an API key (the key's project).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metrics by UTC creation cohort",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailMetricsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Scopes mail:send and job:read required"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "description": "mail_journal_unavailable"
          }
        }
      }
    },
    "/emails/bounce-reasons": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Project bounce reasons over 7 or 30 days",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "description": "Required in a console session; ignored with an API key (the key's project).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                7,
                30
              ],
              "default": 7
            }
          }
        ],
        "responses": {
          "200": {
            "description": "From most to least frequent; codes only",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BounceReason"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "Project not found"
          },
          "422": {
            "description": "days_invalid, parameter_unknown, project_id_required"
          },
          "503": {
            "description": "mail_journal_unavailable"
          }
        }
      }
    },
    "/deliverability": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Deliverability by mailbox provider for the key's project (Gmail, Microsoft, Yahoo/AOL, Apple, Orange, others) over 7 and 30 days",
        "description": "Scope job:read. Aggregates of events already recorded, cohort = time of sending; complaints relative to delivered, the rest relative to sent; rates assessed from 50 onwards. Optional service: 404 until it is opened.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "7- and 30-day windows, each provider (even at zero), the total and the named recommendations; aggregates only, no addresses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDeliverability"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing (job:read)"
          },
          "404": {
            "description": "not_found (service not opened)"
          },
          "422": {
            "description": "parameter_unknown"
          },
          "503": {
            "description": "mail_deliverability_unavailable, platform_unavailable"
          }
        }
      }
    },
    "/projects/{project_id}/mail/deliverability": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Deliverability by mailbox provider for the project (console)",
        "description": "Same contract as GET /deliverability, in an administrator session. Optional service: 404 until it is opened.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "7- and 30-day windows, each provider (even at zero), the total and the named recommendations; aggregates only, no addresses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDeliverability"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Reserved for administrators"
          },
          "404": {
            "description": "not_found, project_not_found"
          },
          "422": {
            "description": "parameter_unknown"
          },
          "503": {
            "description": "mail_deliverability_unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/emails.csv": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Email log as CSV (same filters as the log list)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "description": "Required in a console session; ignored with an API key (the key's project).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "queued",
                "scheduled",
                "sent",
                "delivered",
                "delivery_delayed",
                "bounced",
                "complained",
                "failed",
                "suppressed",
                "opened",
                "clicked",
                "canceled"
              ]
            }
          },
          {
            "name": "created_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "UTF-8 CSV: id, created_at, from, to, cc, bcc, subject, last_event, scheduled_at, tags",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "Project not found"
          },
          "422": {
            "description": "limit_invalid, parameter_unknown, status_invalid, cursor_invalid, cursor_conflict, date_range_invalid, tag_invalid, project_id_required"
          },
          "503": {
            "description": "mail_journal_unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/emails/batch": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Send a batch of emails",
        "description": "1 to 100 messages, each tracked by its own job; the idempotency of each message derives from the batch's Idempotency-Key and its position. Atomicity covers only the initial registration of all the jobs: it guarantees neither their joint execution nor their joint delivery. A replay requires the same key and exactly the same ordered list; any addition, removal or reordering returns 409. No attachments in batches.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailBatch"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Atomic registration of the batch: one job per message, in order; execution and delivery remain independent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailBatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "content_length_invalid, body_invalid or idempotency_key_invalid"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing, test_key_not_allowed, live_key_not_allowed, mail_key_restriction_unreadable, mail_sender_not_allowed or mail_key_domain_mismatch"
          },
          "404": {
            "description": "not_found (service not opened)"
          },
          "409": {
            "description": "idempotency_conflict: same key with a different list (content, size or order)"
          },
          "413": {
            "description": "body_too_large (more than 8 MiB)"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "description": "mail_budget_exceeded"
          },
          "503": {
            "description": "mail_route_unavailable, mail_unavailable or job_projection_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/emails/{job_id}/cancel": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Cancel a send still queued (scheduled or not)",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Send cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailResponse"
                }
              }
            }
          },
          "403": {
            "description": "Scope mail:send missing"
          },
          "404": {
            "description": "Send not found"
          },
          "409": {
            "description": "Send already dispatched or finished"
          }
        }
      }
    },
    "/emails/{email_id}": {
      "parameters": [
        {
          "name": "email_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      ],
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get an email and its retained timeline",
        "security": [
          {
            "ApiKey": []
          },
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "description": "Required in a console session; ignored with an API key (the key's project).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailJournalEntry"
                }
              }
            }
          },
          "403": {
            "description": "Scopes mail:send and job:read required"
          },
          "404": {
            "description": "email_not_found"
          },
          "503": {
            "description": "mail_journal_unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Reschedule an email before the worker picks it up",
        "description": "Only scheduled_at can be modified, and only on a send that is already scheduled and still unclaimed. The new UTC time must remain within the next 72 hours.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Send rescheduled atomically",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailUpdateResponse"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (mail:send)"
          },
          "404": {
            "description": "email_not_found"
          },
          "409": {
            "description": "email_not_editable"
          },
          "413": {
            "description": "body_too_large"
          },
          "422": {
            "description": "email_schedule_invalid"
          },
          "503": {
            "description": "mail_unavailable"
          }
        }
      }
    },
    "/templates": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Create a versioned template draft",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Draft created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (template:write)"
          },
          "409": {
            "description": "template_alias_exists"
          },
          "413": {
            "description": "Body larger than 256 KiB"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "description": "mail_contacts_unavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List the project's templates",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page of templates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateListResponse"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (template:read)"
          },
          "422": {
            "description": "pagination_invalid"
          },
          "503": {
            "description": "mail_contacts_unavailable"
          }
        }
      }
    },
    "/templates/{template}": {
      "parameters": [
        {
          "name": "template",
          "in": "path",
          "required": true,
          "description": "UUID or alias of the template.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get a template's draft and published state",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (template:read)"
          },
          "404": {
            "description": "template_not_found"
          },
          "503": {
            "description": "mail_contacts_unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Update only a template's draft",
        "description": "Versions already published remain immutable.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Draft updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (template:write)"
          },
          "404": {
            "description": "template_not_found"
          },
          "409": {
            "description": "template_alias_exists"
          },
          "413": {
            "description": "Body larger than 256 KiB"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "description": "mail_contacts_unavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Delete a template and its versions",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Template deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDeleteResponse"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (template:write)"
          },
          "404": {
            "description": "template_not_found"
          },
          "503": {
            "description": "mail_contacts_unavailable"
          }
        }
      }
    },
    "/templates/{template}/publish": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Publish an immutable version of the draft",
        "description": "A publication identical to the latest version is idempotent and returns created=false.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "template",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Identical version already published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatePublishResponse"
                }
              }
            }
          },
          "201": {
            "description": "New version published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatePublishResponse"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (template:write)"
          },
          "404": {
            "description": "template_not_found"
          },
          "422": {
            "description": "template_not_publishable or template_variable_undeclared"
          },
          "503": {
            "description": "mail_contacts_unavailable"
          }
        }
      }
    },
    "/templates/{template}/duplicate": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Duplicate the draft into a new unpublished template without an alias",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "template",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Copy created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (template:write)"
          },
          "404": {
            "description": "template_not_found"
          },
          "503": {
            "description": "mail_contacts_unavailable"
          }
        }
      }
    },
    "/domains/claim": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Claim a domain already registered by another account (DNS proof): returns the TXT record to publish; no information about the holder",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "maxLength": 253
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Claim created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainClaim"
                }
              }
            }
          },
          "200": {
            "description": "A claim already open for this domain, returned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainClaim"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "api_key_permission_insufficient (full_access key required)"
          },
          "404": {
            "description": "not_found (claim not served: Galon signature disabled), project_not_found"
          },
          "409": {
            "description": "domain_not_claimed (domain free: add it), domain_already_in_your_account, claim_conflict"
          },
          "422": {
            "description": "claim_body_invalid, domain_name_invalid"
          },
          "429": {
            "description": "claim_limit_reached (5 per project per day)"
          },
          "503": {
            "description": "mail_domain_claims_unavailable"
          }
        }
      }
    },
    "/domains/claims/{claim_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get a domain claim",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "claim_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The claim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainClaim"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "claim_not_found"
          },
          "503": {
            "description": "mail_domain_claims_unavailable"
          }
        }
      }
    },
    "/domains/claims/{claim_id}/verify": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Check the TXT record and conclude: transferred (a NEW identity, to be verified, in the project) or blocked (domain active on another account)",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "claim_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "pending, transferred (domain_id) or blocked (reason)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainClaim"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "claim_not_found"
          },
          "409": {
            "description": "domain_already_in_your_account, mail_domain_limit_reached, mail_account_not_ready"
          },
          "410": {
            "description": "claim_expired (7 days)"
          },
          "422": {
            "description": "claim_record_not_found (TXT record missing or not yet propagated)"
          },
          "429": {
            "description": "claim_too_soon: one check every 20 s (retry_after, Retry-After header)"
          },
          "503": {
            "description": "claim_dns_unavailable, mail_signature_unavailable, mail_domain_claims_unavailable"
          }
        }
      }
    },
    "/email-validations": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Validate email addresses (syntax, role, disposable domain, typo, MX)",
        "description": "One address ({email}) or a batch of 1 to 100 ({emails}). Verdict per address: valid, risky, invalid or unknown, with named reasons (reasons). Checks: practical RFC 5321/5322 syntax and internationalised domains (IDN), normalisation, role address, disposable domain, probable typo on the major providers (offered in suggestion, never applied), MX records (missing with A/AAAA fallback, null MX, non-existent domain). No SMTP connection is opened to the recipients' servers: the existence of the mailbox itself is not verified. valid requires an MX record and no risk reason; unknown indicates a DNS that did not respond in time. Scope validation:check; 1 000 addresses per minute per key. Optional Idempotency-Key: the same request replayed under the same key returns the same response (header Idempotent-Replayed: true).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailValidationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An email_validation object for {email}; {object: list, data} in the order received for {emails}",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EmailValidation"
                    },
                    {
                      "$ref": "#/components/schemas/EmailValidationList"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "body_invalid, idempotency_key_invalid"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing: scope validation:check missing"
          },
          "404": {
            "description": "not_found: service not open to this account"
          },
          "409": {
            "description": "idempotency_conflict"
          },
          "413": {
            "description": "Body larger than 128 KiB"
          },
          "422": {
            "description": "validation_request_invalid, validation_batch_empty, validation_batch_too_large"
          },
          "429": {
            "description": "rate_limited (Retry-After)"
          },
          "503": {
            "description": "validation_unavailable, platform_unavailable"
          }
        }
      }
    },
    "/builds": {
      "post": {
        "tags": [
          "Builds"
        ],
        "summary": "Build a web application",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BuildCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Build accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuildCreateResponse"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (build:create)"
          },
          "409": {
            "description": "idempotency_conflict"
          },
          "422": {
            "description": "build_plan_invalid or build_plan_unresolved"
          },
          "503": {
            "$ref": "#/components/responses/JobProjectionInvalid"
          }
        }
      }
    },
    "/builds/{job_id}": {
      "get": {
        "tags": [
          "Builds"
        ],
        "summary": "Get a build",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Build",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuildResponse"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (build:read)"
          },
          "404": {
            "description": "build_not_found"
          }
        }
      }
    },
    "/builds/{job_id}/cancel": {
      "post": {
        "tags": [
          "Builds"
        ],
        "summary": "Cancel a build before it starts",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Build cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuildResponse"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (build:cancel)"
          },
          "404": {
            "description": "build_not_found"
          },
          "409": {
            "description": "build_terminal"
          }
        }
      }
    },
    "/builds/{job_id}/artifacts": {
      "get": {
        "tags": [
          "Builds"
        ],
        "summary": "List a build's artefacts",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Artefacts stripped of any storage reference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactListResponse"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (artifact:read)"
          },
          "404": {
            "description": "build_not_found"
          },
          "503": {
            "description": "artifact_projection_invalid"
          }
        }
      }
    },
    "/projects/{project_id}/domains": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "List the domain portfolio from the console",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Portfolio without holder identity or registrar reference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "domains"
                  ],
                  "properties": {
                    "domains": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DomainPortfolioItem"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domain-quotes/{quote_id}": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Re-read a domain quote from the console",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/QuoteId"
          }
        ],
        "responses": {
          "200": {
            "description": "Commercial quote without wholesale cost",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "quote"
                  ],
                  "properties": {
                    "quote": {
                      "$ref": "#/components/schemas/DomainQuote"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Quote not found"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domain-orders": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "List domain orders from the console",
        "description": "The provider cost and the payment reference remain internal.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Project's commercial register",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "orders"
                  ],
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DomainOrder"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domain-notices": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "List expiry notices from the console",
        "description": "The read computes and deduplicates notices, with no charge and no registrar call.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Project notices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "notices"
                  ],
                  "properties": {
                    "notices": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DomainNotice"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domain-notices/{notice_id}": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Mark an expiry notice",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/NoticeId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainNoticeUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Notice updated"
          },
          "404": {
            "description": "Notice not found"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domain-orders/{order_id}/refund-requests": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Request a refund review",
        "description": "This route records a human request. It never triggers an automatic refund.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/OrderId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainRefundRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request recorded"
          },
          "404": {
            "description": "Order not found"
          },
          "422": {
            "description": "Order not eligible"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domains/lookup": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Check a domain from the console",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainLookup"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Search queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobSubmissionResponse"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "$ref": "#/components/responses/JobProjectionInvalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domains/query": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Request a quote, the status or the DNS from the console",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "type",
                  "input"
                ],
                "properties": {
                  "type": {
                    "enum": [
                      "domain.quote",
                      "domain.inspect",
                      "domain.dns.read"
                    ]
                  },
                  "input": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Read queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobSubmissionResponse"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "$ref": "#/components/responses/JobProjectionInvalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domains/actions": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Confirm an exact domain action from the console",
        "description": "The administrator session constitutes the human approval. The approval expires after 30 minutes and applies only to the exact intent. Transfer, renew and restore remain limited to test projects: no live execution before payment and durable binding to the adapter.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainAction"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Action approved and queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobSubmissionResponse"
                }
              }
            }
          },
          "404": {
            "description": "Project or domain quote not found"
          },
          "409": {
            "description": "Idempotency conflict"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "description": "Domain vault unavailable or job_projection_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/domains": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Add a Galon Mail sending domain",
        "description": "Compatible with the Galon Mail API. Requires a full_access key; returns the DNS records to publish.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailDomainCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Sending domain and DNS records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDomain"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "api_key_permission_insufficient"
          },
          "409": {
            "description": "domain_already_exists"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "503": {
            "description": "mail_domains_unavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List Galon Mail sending domains",
        "description": "Compatible with the Galon Mail sending domain list. Requires a full_access key.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of sending domains",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDomainListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "api_key_permission_insufficient"
          },
          "503": {
            "description": "mail_domains_unavailable"
          }
        }
      }
    },
    "/domains/{domain_id}": {
      "parameters": [
        {
          "name": "domain_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get a sending domain and its DNS records",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sending domain",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDomain"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          }
        }
      },
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Update the mutable options of a sending domain",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MailDomainUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Domain updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDomain"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          }
        }
      },
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Delete a domain after exact confirmation",
        "description": "Confirmation in the Galon-Confirm header or the body {confirm}; destructive deletion.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Domain deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDomainDeleteResponse"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          },
          "409": {
            "description": "Active restricted keys"
          },
          "428": {
            "description": "Exact confirmation required"
          }
        }
      }
    },
    "/domains/{domain_id}/verify": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Re-check a domain's DNS records",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Domain and DNS statuses refreshed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailDomain"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          },
          "502": {
            "description": "Provider unavailable"
          }
        }
      }
    },
    "/domain-portfolio": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "List the portfolio of the key's project",
        "description": "Requires the domain:read scope. Internal tenant and registrar identifiers are never returned.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Domain portfolio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "domains"
                  ],
                  "properties": {
                    "domains": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DomainPortfolioItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope domain:read missing"
          }
        }
      }
    },
    "/domain-quotes/{quote_id}": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Re-read a quote of the key's project",
        "description": "Requires the domain:quote scope. The wholesale cost and the registrar reference remain internal.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/QuoteId"
          }
        ],
        "responses": {
          "200": {
            "description": "Commercial quote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "quote"
                  ],
                  "properties": {
                    "quote": {
                      "$ref": "#/components/schemas/DomainQuote"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope domain:quote missing"
          },
          "404": {
            "description": "Quote not found"
          }
        }
      }
    },
    "/domain-orders": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "List orders of the key's project",
        "description": "Requires domain:read. Payment references and provider costs remain internal.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Commercial register",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "orders"
                  ],
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DomainOrder"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Scope domain:read missing"
          }
        }
      }
    },
    "/projects/{project_id}/jobs/{job_id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get a job from the console",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/jobs": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "List the project's jobs from the console (paginated, status filter)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "en_file",
                "en_cours",
                "reussi",
                "echoue",
                "annule",
                "indetermine"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Jobs from newest to oldest, next_cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Project not found"
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/jobs/{job_id}/cancel": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Cancel a job from the console (idempotent: a finished job returns its state)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "job, cancelled, changed, final",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobCancelResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Not cancellable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/tools": {
      "get": {
        "tags": [
          "Tools"
        ],
        "summary": "Registry tools available to the project from the console",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "available tools, unavailable with the reason"
          },
          "404": {
            "description": "Project not found"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/subscriptions": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Subscriptions of all the organisation's projects",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "One row per project and per product",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BillingSubscription"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/details": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Billing details",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Details (empty if never provided)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingDetails"
                }
              }
            }
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "put": {
        "tags": [
          "Billing"
        ],
        "summary": "Replace the billing details",
        "security": [
          {
            "Session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingDetails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Details saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingDetails"
                }
              }
            }
          },
          "422": {
            "description": "billing_details_invalid, billing_emails_invalid, billing_address_invalid, billing_country_invalid, billing_tax_id_invalid, billing_legal_name_invalid"
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/invoices": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Galon invoices issued by GALON AI LTD",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Invoices, most recent first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invoice"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/invoices/{invoice_id}/pdf": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "PDF of an invoice (amount = price paid, no tax line)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "invoice_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^inv_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "invoice_not_found"
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/budget": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Monthly budget and alert thresholds",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Budget (null: none)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Budget"
                }
              }
            }
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "put": {
        "tags": [
          "Billing"
        ],
        "summary": "Set the monthly budget (email alerts at 50, 80 and 100 %)",
        "security": [
          {
            "Session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Budget"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Budget saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Budget"
                }
              }
            }
          },
          "422": {
            "description": "budget_invalid, budget_amount_invalid, budget_thresholds_invalid"
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/payment-method": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Card saved for subscriptions (display only)",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "The card, or null",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PaymentMethodCard"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/payment-method/update": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Open the card update (secure payment page)",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "The address of the verification page for the new card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "no_card_on_file"
          },
          "429": {
            "description": "too_many_attempts"
          },
          "503": {
            "description": "payment_method_update_unavailable or billing_unavailable"
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/usage.csv": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "CSV export for the month (invoices and sending counters)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV: month, date, project_id, project_name, service, product, plan_id, item, quantity, unit, amount_usd_cents, invoice_number",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "month_invalid"
          },
          "401": {
            "description": "Session required"
          },
          "403": {
            "description": "Administrator required (reserve_admin)"
          },
          "503": {
            "description": "Billing unavailable (billing_unavailable)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/pricing": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Public prices of the eight Galon services (USD)",
        "responses": {
          "200": {
            "description": "Open services with their price lists; the others 'soon', without prices",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pricing"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/sales/contact": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Contact the sales team",
        "security": [
          {
            "Session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesContact"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request recorded; acknowledgement sent by email",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^sales_[0-9a-f]{32}$"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Session required"
          },
          "422": {
            "description": "sales_contact_invalid, sales_contact_email_invalid"
          },
          "429": {
            "description": "too_many_requests"
          },
          "503": {
            "description": "billing_unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/billing/payment-methods": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Payment methods offered for a billing country",
        "description": "Reserved for administrators. `card` when payment is open; `mobile_money` only if the billing country is covered. No currency, payment provider or amount in the response. Payment closed: empty list.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Methods offered for this country",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethods"
                }
              }
            }
          },
          "403": {
            "description": "Administrator required"
          },
          "422": {
            "description": "Country missing (billing_country_required) or invalid (billing_country_invalid)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/usage": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Measurable usage from the console (what is not measured is named)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Projects, keys, jobs by status and by day, measured consumption (quantities, no amounts) or not_measured, and the month's spend in US dollars per project and per service (spend)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "spend": {
                      "$ref": "#/components/schemas/UsageSpend"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/console/preferences": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Account language set for the console (empty if no explicit setting)",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "language, source, languages served, rtl"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/console/available-scopes": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Scopes a key can receive: services that work for this account (registry tools and companions)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "available, closed (scope, service, reason), coming_soon"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/keys/vault": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Secure copy: vault configured, copyable keys",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "vault (configured|missing), copyable (ids)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/keys/{key_id}/copy": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Copy the secret of a sealed key after re-authentication (never cached, logged)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "totp_code": {
                    "type": "string",
                    "maxLength": 16
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "key (the secret, Cache-Control no-store)"
          },
          "403": {
            "description": "invalid_credentials, two_factor_required, invalid_totp"
          },
          "409": {
            "description": "key_revoked, key_not_copyable"
          },
          "429": {
            "description": "too_many_attempts (Retry-After)"
          },
          "503": {
            "description": "key_vault_unavailable, key_vault_mismatch"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/keys/{key_id}": {
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Change a key's scopes (same identifier, same secret), or rename it (body {name} only)",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "scopes"
                    ],
                    "properties": {
                      "scopes": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 64,
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "name"
                    ],
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 100
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "key"
          },
          "409": {
            "description": "key_revoked"
          },
          "422": {
            "description": "scopes_invalid, scope_not_available, api_key_name_invalid"
          },
          "503": {
            "description": "api_key_name_unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/mail/status": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Galon Mail for this account: armed, sending mode, identity, DNS records, payment available",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "armed, sending_mode, tenant_status, identity, dns, checkout"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/mail/dns/verify": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Check the sending domain's DNS records now (public DNS observed, re-read requested from the sending service); 1 call per minute per tenant",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Same view as GET mail/status, dns.entries checked now, dns.verification_refresh_requested (the old name of this field is still served in N-1, deprecated, until 2027-02-03)"
          },
          "409": {
            "description": "mail_identity_missing: no sending domain"
          },
          "429": {
            "description": "verify_rate_limited (Retry-After)"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/console/mail-requirements": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Console help: sending requirements enforced by Galon Mail (Markdown)",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "document, language, markdown"
          },
          "404": {
            "description": "Help not yet published"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/webhook-events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List event types",
        "security": [
          {
            "Session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Closed types"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List endpoints",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Endpoints without secret",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create an endpoint and display its secret once",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Endpoint created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreateResponse"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/webhooks/{endpoint_id}": {
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Update an endpoint's URL, events or state",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Endpoint updated, without secret",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "404": {
            "description": "webhook_not_found"
          },
          "422": {
            "description": "webhook_invalid"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/webhooks/{endpoint_id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Rotate the signing secret with a 24-hour overlap",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "New secret displayed only once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookRotateSecretResponse"
                }
              }
            }
          },
          "404": {
            "description": "webhook_not_found"
          },
          "503": {
            "description": "webhook_unavailable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/webhooks/{endpoint_id}/disable": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Disable an endpoint",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Endpoint disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "404": {
            "description": "Endpoint not found"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/webhook-deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List deliveries",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deliveries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryListResponse"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/webhook-deliveries/{delivery_id}/replay": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Replay a terminal delivery",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Requeued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not replayable"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/suppressions": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Add addresses to the suppression list",
        "description": "Key created with the full_access permission (same rule as /domains). 1 to 1 000 addresses per call.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    },
                    "minItems": 1,
                    "maxItems": 1000
                  }
                },
                "required": [
                  "emails"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Addresses added",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, api_key_permission_insufficient",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List the suppression list",
        "description": "Key created with the full_access permission (same rule as /domains).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 256
            },
            "description": "cursor of the next page"
          },
          {
            "in": "query",
            "name": "email",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page of suppressions",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "api_key_permission_insufficient",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/suppressions/{target}": {
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Remove an address from the suppression list",
        "description": "Key created with the full_access permission (same rule as /domains). A complaint (complaint) cannot be removed.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "target",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "email address or suppression identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Address removed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found in this project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A complaint cannot be removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/received-emails": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List received emails",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 256
            },
            "description": "cursor of the next page"
          }
        ],
        "responses": {
          "200": {
            "description": "Page of received emails (cursor)",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "not_found (inbound closed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/received-emails/{email_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get a received email",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise). Text, HTML, headers, attachments and forwards.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "email_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Received email",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/received-emails/{email_id}/attachments": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List a received email's attachments",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "email_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment metadata",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/received-emails/{email_id}/attachments/{attachment_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Download an attachment",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise). Bytes streamed, download forced.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "email_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/received-emails/{email_id}/forward": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Forward a received email",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise). Forwarding is an ordinary send (job mail.send).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "email_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    }
                  },
                  "from": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "to",
                  "from"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Forward accepted",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/receiving-domains": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List inbound domains",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Project's inbound domains",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Register an inbound domain",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise). The domain must be a verified sending identity; the response gives the MX record to publish.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Domain registered, MX to publish",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "Already registered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Domain not verified or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "inbound_region_unconfigured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/receiving-domains/{domain_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get an inbound domain",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "inbound domain identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Domain and MX to publish",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Enable or disable an inbound domain",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "inbound domain identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Domain updated",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Remove an inbound domain",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise). Also removes its rules and its messages.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "inbound domain identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Domain removed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/receiving-domains/{domain_id}/rules": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List a domain's forwarding rules",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "inbound domain identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Rules",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Create a forwarding rule",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "inbound domain identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  },
                  "forward_to": {
                    "type": "string"
                  },
                  "from": {
                    "type": "string"
                  }
                },
                "required": [
                  "address",
                  "forward_to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Rule created",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/receiving-domains/{domain_id}/rules/{rule_id}": {
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Enable or disable a forwarding rule",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "inbound domain identifier"
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rule updated",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Delete a forwarding rule",
        "description": "Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "inbound domain identifier"
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rule deleted",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/domains": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List Mail Pro domains",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Project domains",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Attach a Mail Pro domain",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes. Returns the TXT proof and the DNS lines to publish.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Domain attached",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/domains/{domain_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get a Mail Pro domain",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "Mail Pro domain identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Status and DNS lines",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Remove a Mail Pro domain",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes. Refused while a mailbox or an alias lives on it.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "Mail Pro domain identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Domain removed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/domains/{domain_id}/verify": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Verify a Mail Pro domain",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes. Re-reads the proof and the DNS.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "Mail Pro domain identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Verification result",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/mailboxes": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "List Mail Pro mailboxes",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Project mailboxes",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Create a Mail Pro mailbox",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes. Password, or activation link (activation: true).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain_id": {
                    "type": "string"
                  },
                  "local_part": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "quota_mib": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "password": {
                    "type": "string"
                  },
                  "activation": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "domain_id",
                  "local_part",
                  "display_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Mailbox created",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/mailboxes/{mailbox_id}": {
      "get": {
        "tags": [
          "Mail"
        ],
        "summary": "Get a Mail Pro mailbox",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Status, aliases, quota usage",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "patch": {
        "tags": [
          "Mail"
        ],
        "summary": "Change a mailbox's quota",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quota_mib": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "quota_mib"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mailbox updated",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Delete a mailbox (reversible for 30 days)",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Mailbox deleted",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/mailboxes/{mailbox_id}/suspend": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Suspend a mailbox",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Mailbox suspended",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/mailboxes/{mailbox_id}/resume": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Reactivate a mailbox",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Mailbox reactivated",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/mailboxes/{mailbox_id}/aliases": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Add an alias to a mailbox",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  }
                },
                "required": [
                  "address"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Alias added",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/mailboxes/{mailbox_id}/aliases/{address}": {
      "delete": {
        "tags": [
          "Mail"
        ],
        "summary": "Remove an alias",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          },
          {
            "in": "path",
            "name": "address",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Alias removed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/mailboxes/{mailbox_id}/password": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Change a mailbox's password",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string"
                  }
                },
                "required": [
                  "password"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password changed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/mailboxes/{mailbox_id}/activation-link": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Send an activation link",
        "description": "Scopes mailpro:read / mailpro:write. Galon Mail Pro (hosted mailboxes) is served only when the service is open to the account (404 not_found otherwise). Errors: envelope {\"error\": {code, message_key, retryable, ...}}, mailpro.* codes.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "mailbox_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "mailbox identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Link issued",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/mail-pro/activate": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Activate a mailbox from the link received",
        "description": "Public, no authentication: single-use token, valid for 72 hours. Served only when Mail Pro is open to the account.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                },
                "required": [
                  "token",
                  "password"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mailbox activated",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ai/chat/completions": {
      "post": {
        "tags": [
          "AI"
        ],
        "summary": "Generate a response (chat completions compatible)",
        "description": "Scope ai:inference. Available on request: served only when Galon AI is open to the account (404 otherwise). No provider name is returned. Idempotency-Key required; reservation against the balance BEFORE the call (402 if the balance does not cover it). stream: true returns text/event-stream (usage in the last chunk) when the model publishes it; tools, response_format and images only for a model that publishes the capability.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "model": "<id from GET /ai/models>",
                  "messages": [
                    {
                      "role": "user",
                      "content": "Hello"
                    }
                  ]
                },
                "required": [
                  "model",
                  "messages"
                ],
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "max_tokens": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "top_p": {
                    "type": "number"
                  },
                  "stop": {},
                  "stream": {
                    "type": "boolean"
                  },
                  "seed": {
                    "type": "integer"
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "tool_choice": {},
                  "response_format": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response in chat completions format (or SSE stream)",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Unsupported field: code, field and message say what to correct",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request quota reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "model_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/ai/models": {
      "get": {
        "tags": [
          "AI"
        ],
        "summary": "List served models",
        "description": "Scope ai:inference. Available on request: served only when Galon AI is open to the account (404 otherwise). No provider name is returned. Under their real names, with publisher, category, licence, context and client price.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of models",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/ai/embeddings": {
      "post": {
        "tags": [
          "AI"
        ],
        "summary": "Compute embeddings",
        "description": "Scope ai:inference. Available on request: served only when Galon AI is open to the account (404 otherwise). No provider name is returned. Exposed only if an embeddings model is served. Idempotency-Key required.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {},
                  "encoding_format": {
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Vectors",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "model_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/storage/objects/{object_id}/versions": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "List an object's versions",
        "description": "Exact scope storage:read. Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^obj_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Retained versions and retention period",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "storage_object_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/storage/objects/{object_id}/restore": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Restore an earlier version",
        "description": "Exact scope storage:write. No body. Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^obj_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Object restored",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "storage_object_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/storage/objects/{object_id}/links": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Create a time-limited signed link",
        "description": "Exact scope storage:read. Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^obj_[0-9a-f]{32}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expires_in": {
                    "type": "integer"
                  },
                  "disposition": {
                    "enum": [
                      "attachment",
                      "inline"
                    ]
                  }
                },
                "required": [
                  "expires_in"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Signed URL, expiry",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "body_fields_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "storage_object_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/storage/usage/history": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Get Storage usage history",
        "description": "Exact scope storage:read. Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "number of days (30 by default)"
          }
        ],
        "responses": {
          "200": {
            "description": "Daily points: bytes stored, added, removed, uploads",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/storage/tier": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Get the project's Storage tier",
        "description": "Exact scope storage:read. Prices in USD cents. Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tiers offered, current tier and scheduled change",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "put": {
        "tags": [
          "Storage"
        ],
        "summary": "Change Storage tier",
        "description": "Exact scope storage:write. Paid from the balance. Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tier_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "tier_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Change applied or scheduled",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "storage_tier_unknown",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/storage/buckets/{bucket_id}/access": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Get a bucket's public access",
        "description": "Exact scope storage:read. Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "bucket_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^bkt_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "public, public URL, today's egress",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "storage_bucket_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "put": {
        "tags": [
          "Storage"
        ],
        "summary": "Make a bucket public or private",
        "description": "Exact scope storage:write. {\"public\": true, \"confirm\": \"allow\"} to open, {\"public\": false, \"confirm\": \"disallow\"} to close. Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "bucket_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^bkt_[0-9a-f]{32}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "public": {
                    "type": "boolean"
                  },
                  "confirm": {
                    "enum": [
                      "allow",
                      "disallow"
                    ]
                  }
                },
                "required": [
                  "public",
                  "confirm"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Access changed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "storage_bucket_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/storage/transfers/{token}": {
      "put": {
        "tags": [
          "Storage"
        ],
        "summary": "Upload an object's bytes (single PUT)",
        "description": "Capability returned by POST /storage/buckets/{bucket_id}/uploads: exact capability headers (Content-Length, If-None-Match: *, X-Galon-Checksum-Sha256). Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "upload capability token (5 minutes at most)"
          }
        ],
        "responses": {
          "201": {
            "description": "Bytes received"
          },
          "412": {
            "description": "storage_precondition_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "storage_checksum_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/transfers/{token}/multipart": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Open (or resume) a multipart upload",
        "description": "Multipart upload, using the capability returned at begin (no API key: the sealed token is authoritative). Fixed-size parts, the last one smaller, 10 000 at most. Served only when multipart upload is open (404 otherwise). Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "upload capability token (5 minutes at most)"
          }
        ],
        "responses": {
          "200": {
            "description": "Upload session: part size and number of parts",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Storage"
        ],
        "summary": "Abort a multipart upload",
        "description": "Multipart upload, using the capability returned at begin (no API key: the sealed token is authoritative). Fixed-size parts, the last one smaller, 10 000 at most. Served only when multipart upload is open (404 otherwise). Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "upload capability token (5 minutes at most)"
          }
        ],
        "responses": {
          "200": {
            "description": "Parts released",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/storage/transfers/{token}/parts": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Get received parts (resume)",
        "description": "Multipart upload, using the capability returned at begin (no API key: the sealed token is authoritative). Fixed-size parts, the last one smaller, 10 000 at most. Served only when multipart upload is open (404 otherwise). Hidden surface: 404 not_found until Galon Storage is open to the account.",
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "upload capability token (5 minutes at most)"
          }
        ],
        "responses": {
          "200": {
            "description": "Parts received",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/storage/transfers/{token}/parts/{part_number}": {
      "put": {
        "tags": [
          "Storage"
        ],
        "summary": "Upload a part",
        "description": "Multipart upload, using the capability returned at begin (no API key: the sealed token is authoritative). Fixed-size parts, the last one smaller, 10 000 at most. Served only when multipart upload is open (404 otherwise). Hidden surface: 404 not_found until Galon Storage is open to the account. Content-Length and X-Galon-Checksum-Sha256 headers.",
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "upload capability token (5 minutes at most)"
          },
          {
            "in": "path",
            "name": "part_number",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Part received",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "412": {
            "description": "Invalid part size or number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "storage_checksum_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/transfers/{token}/complete": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Assemble the parts",
        "description": "Multipart upload, using the capability returned at begin (no API key: the sealed token is authoritative). Fixed-size parts, the last one smaller, 10 000 at most. Served only when multipart upload is open (404 otherwise). Hidden surface: 404 not_found until Galon Storage is open to the account. Then confirm with POST /storage/uploads/{upload_id}/commit.",
        "security": [],
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "upload capability token (5 minutes at most)"
          }
        ],
        "responses": {
          "200": {
            "description": "Object assembled and verified",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "storage_multipart_incomplete",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "storage_checksum_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deploy/archives": {
      "post": {
        "tags": [
          "Deploy"
        ],
        "summary": "Deploy a static site from an archive (preview)",
        "description": "Scope deploy:create, TEST key only (a live key gets 404 not_found). Served only when Galon Deploy archives are enabled for the account (404 otherwise). Send the files as JSON (files or archive_base64) or the raw archive (zip, tar, tar.gz: the format is read from the file signature). index.html is required at the root; a single top-level folder holding index.html is stripped. Bounds: 25 MiB uploaded, 512 files, 2 MiB per file, 10 MiB in total, 40 MiB decompressed; links, devices, absolute paths, .. and .git are refused. Then advance the returned journey with POST /deploy/journeys/{journey_id}/resume until status is ready. Errors {\"detail\": {\"code\"}}. Send `Prefer: wait=20` on `POST /v1/deploy/archives` or `/journeys`: the steps run inside the request (20 s at most) and the response carries the preview, its `preview_access_token` and `wait.outcome`; if `outcome` is not `ready`, continue with `…/resume`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "in": "query",
            "name": "expires_at",
            "required": false,
            "description": "Raw archive bodies only (a JSON body carries expires_at in the body and accepts no query).",
            "schema": {
              "type": "string",
              "format": "date-time",
              "maxLength": 32
            }
          },
          {
            "name": "Prefer",
            "in": "header",
            "required": false,
            "description": "wait=N (1 to 30 seconds, 25 recommended): run the deploy steps inside the request and return the preview when ready.",
            "schema": {
              "type": "string",
              "pattern": "^wait=[0-9]{1,2}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "description": "Exactly one of files or archive_base64. Body at most 1 MiB.",
                "properties": {
                  "files": {
                    "type": "object",
                    "minProperties": 1,
                    "maxProperties": 512,
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Relative path -> UTF-8 text content. index.html is required at the root."
                  },
                  "archive_base64": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9+/]+={0,2}$",
                    "description": "A zip, tar or tar.gz archive, base64-encoded."
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time",
                    "maxLength": 32,
                    "description": "Preview expiry, UTC with Z, at most 7 days ahead. Default: 00:00 UTC four days after today."
                  }
                },
                "oneOf": [
                  {
                    "required": [
                      "files"
                    ]
                  },
                  {
                    "required": [
                      "archive_base64"
                    ]
                  }
                ]
              }
            },
            "application/zip": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 26214400
              }
            },
            "application/x-zip-compressed": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 26214400
              }
            },
            "application/x-tar": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 26214400
              }
            },
            "application/gzip": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 26214400
              }
            },
            "application/x-gzip": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 26214400
              }
            },
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary",
                "maxLength": 26214400
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Archive accepted, preview journey created",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "journey",
                    "replayed",
                    "archive"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "journey": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "The preview deploy journey (same view as GET /deploy/journeys/{journey_id}). Advance it with POST /deploy/journeys/{journey_id}/resume until status is ready or failed."
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "true when the same Idempotency-Key and the same content were already accepted"
                    },
                    "archive": {
                      "type": "object",
                      "required": [
                        "sha256",
                        "file_count",
                        "size_bytes"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$",
                          "description": "Identity of the normalised file set"
                        },
                        "file_count": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 512
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10485760
                        }
                      }
                    },
                    "wait": {
                      "type": "object",
                      "description": "Present when Prefer: wait was sent. outcome: ready, or the reason to continue with …/resume.",
                      "properties": {
                        "outcome": {
                          "type": "string",
                          "description": "ready, or why the wait ended before."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "journey",
                    "replayed",
                    "archive"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "journey": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "The preview deploy journey (same view as GET /deploy/journeys/{journey_id}). Advance it with POST /deploy/journeys/{journey_id}/resume until status is ready or failed."
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "true when the same Idempotency-Key and the same content were already accepted"
                    },
                    "archive": {
                      "type": "object",
                      "required": [
                        "sha256",
                        "file_count",
                        "size_bytes"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$",
                          "description": "Identity of the normalised file set"
                        },
                        "file_count": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 512
                        },
                        "size_bytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10485760
                        }
                      }
                    },
                    "wait": {
                      "type": "object",
                      "description": "Present when Prefer: wait was sent. outcome: ready, or the reason to continue with …/resume.",
                      "properties": {
                        "outcome": {
                          "type": "string",
                          "description": "ready, or why the wait ended before."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "idempotency_key_invalid, content_length_invalid, body_invalid, body_fields_invalid, query_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "scope_missing, deploy_tenant_not_allowed, journey_source_not_connected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found (live key, or Deploy archives not open to the account)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_conflict, deploy_journey_conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "deploy_archive_too_large, deploy_archive_too_many_files, deploy_archive_file_too_large, deploy_archive_content_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "content_type_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "deploy_archive_format_invalid, deploy_archive_path_invalid, deploy_archive_link_refused, deploy_archive_entry_refused, deploy_archive_duplicate_path, deploy_archive_index_missing, deploy_archive_empty, journey_preview_expiry_invalid, journey_timestamp_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "deploy_archive_quota_exceeded (Retry-After: 3600), deploy_quota_daily_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "deploy_auth_unavailable, deploy_archive_storage_unavailable, deploy_archive_storage_not_configured, deploy_temporarily_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "507": {
            "description": "deploy_archive_storage_full",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deploy/journeys": {
      "post": {
        "tags": [
          "Deploy"
        ],
        "summary": "Start a preview deployment",
        "description": "Scope deploy:create. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}. One step at a time: advance with POST /deploy/journeys/{journey_id}/resume. Send `Prefer: wait=20` on `POST /v1/deploy/archives` or `/journeys`: the steps run inside the request (20 s at most) and the response carries the preview, its `preview_access_token` and `wait.outcome`; if `outcome` is not `ready`, continue with `…/resume`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "Prefer",
            "in": "header",
            "required": false,
            "description": "wait=N (1 to 30 seconds, 25 recommended): run the deploy steps inside the request and return the preview when ready.",
            "schema": {
              "type": "string",
              "pattern": "^wait=[0-9]{1,2}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intention": {
                    "type": "object",
                    "properties": {
                      "installation_ref": {
                        "type": "string"
                      },
                      "repository": {
                        "type": "string"
                      },
                      "commit_sha": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{40}$"
                      },
                      "root_path": {
                        "type": "string"
                      },
                      "domain": {
                        "type": "string"
                      }
                    }
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "intention",
                  "expires_at"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Deployment created",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "wait": {
                      "type": "object",
                      "description": "Present when Prefer: wait was sent. outcome: ready, or the reason to continue with …/resume.",
                      "properties": {
                        "outcome": {
                          "type": "string",
                          "description": "ready, or why the wait ended before."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "Idempotent replay",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "wait": {
                      "type": "object",
                      "description": "Present when Prefer: wait was sent. outcome: ready, or the reason to continue with …/resume.",
                      "properties": {
                        "outcome": {
                          "type": "string",
                          "description": "ready, or why the wait ended before."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "deploy_quota_daily_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "List preview deployments",
        "description": "Scope job:read. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recent deployments (galon.deploy.journeys.v1)",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/journeys/{journey_id}": {
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "Get a deployment",
        "description": "Scope job:read. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "journey_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^djy_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deployment",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "deploy_journey_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/journeys/{journey_id}/resume": {
      "post": {
        "tags": [
          "Deploy"
        ],
        "summary": "Advance a deployment by one step",
        "description": "Scope deploy:create. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}. 202 while the step is still running (Retry-After).",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "journey_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^djy_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Step completed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "202": {
            "description": "Step in progress",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "deploy_journey_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/journeys/{journey_id}/build-logs": {
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "Get the build log",
        "description": "Scope job:read. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "journey_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^djy_[0-9a-f]{32}$"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "first line to read"
          }
        ],
        "responses": {
          "200": {
            "description": "Lines, continuation (next) and outcome",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "deploy_build_log_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/runtime/{instance_id}/logs": {
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "Get the runtime log (server rendering)",
        "description": "Scope job:read. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rti_[0-9a-f]{32}$"
            }
          },
          {
            "in": "query",
            "name": "lines",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Latest lines",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "deploy_runtime_instance_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/env": {
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "Get environment variables",
        "description": "Scope deploy:create. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}. Names of all variables, values of public variables only; a secret never has a value.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Variables (galon.deploy.env.v1)",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/production/plans": {
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "List production plans",
        "description": "Scope job:read. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Plans, prices in USD",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/production/status": {
      "get": {
        "tags": [
          "Deploy"
        ],
        "summary": "Get the production status",
        "description": "Scope job:read. Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Served release, previous release, domains",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/production/plan": {
      "post": {
        "tags": [
          "Deploy"
        ],
        "summary": "Choose a production plan",
        "description": "Scope deploy:create. Write: live key required (403 deploy_production_live_key_required with a test key). Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "plan_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Plan chosen",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "deploy_plan_unknown",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/production/domains": {
      "post": {
        "tags": [
          "Deploy"
        ],
        "summary": "Attach a custom domain",
        "description": "Scope deploy:create. Write: live key required (403 deploy_production_live_key_required with a test key). Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}. The response gives the TXT proof record (_galon-challenge.<domaine>) and the routing: CNAME for a subdomain, A for the apex.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Domain attached, records to publish",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "200": {
            "description": "Already attached",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/production/domains/{domain}/verify": {
      "post": {
        "tags": [
          "Deploy"
        ],
        "summary": "Verify a custom domain",
        "description": "Scope deploy:create. Write: live key required (403 deploy_production_live_key_required with a test key). Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}. The TLS certificate is issued on demand once the domain is verified.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DNS verification result",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/production/domains/{domain}": {
      "delete": {
        "tags": [
          "Deploy"
        ],
        "summary": "Detach a custom domain",
        "description": "Scope deploy:create. Write: live key required (403 deploy_production_live_key_required with a test key). Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Domain detached",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/production/promote": {
      "post": {
        "tags": [
          "Deploy"
        ],
        "summary": "Promote a preview to production",
        "description": "Scope deploy:create. Write: live key required (403 deploy_production_live_key_required with a test key). Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "journey_id": {
                    "type": "string",
                    "pattern": "^djy_[0-9a-f]{32}$"
                  }
                },
                "required": [
                  "journey_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Release promoted",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "deploy_production_journey_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/deploy/production/rollback": {
      "post": {
        "tags": [
          "Deploy"
        ],
        "summary": "Roll back to the previous release",
        "description": "Scope deploy:create. Write: live key required (403 deploy_production_live_key_required with a test key). Served only when Galon Deploy is open to the account (404 otherwise). Errors {\"detail\": {\"code\"}}. No body: one step back. Choosing an earlier release ({\"release_id\"}) is available on request.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Previous release served",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "body_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/projects/{project_id}/domain-transfers/check": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Check eligibility for an inbound transfer",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403. No side effects, before payment.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Eligibility",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domain-transfers": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Track inbound transfers",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Transfers and amounts (reserved, charged, refunded)",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Request an inbound transfer",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403. Reserves the transfer quote price against the balance. The authorisation code (EPP) is never returned or logged.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "auth_code": {
                    "type": "string",
                    "writeOnly": true
                  },
                  "quote_id": {
                    "type": "string"
                  },
                  "renewal_quote_id": {
                    "type": "string"
                  },
                  "registrant": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "confirmations": {
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "required": [
                  "domain",
                  "auth_code",
                  "quote_id",
                  "registrant",
                  "confirmations"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Transfer submitted",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Transfer already in progress or quote expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Named refusal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domains/{domain}/email-verification": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Get the holder's email verification",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          },
          {
            "in": "path",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "domain name"
          }
        ],
        "responses": {
          "200": {
            "description": "Verified, pending (deadline) or suspended",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domains/{domain}/transfer-out": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Prepare an outbound transfer",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403. Unlocks the domain then returns its authorisation code ONCE (no-store). 5 requests per hour per account.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          },
          {
            "in": "path",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "domain name"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorisation code and next steps",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "domain_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "domain_transfer_out_status, domain_transfer_out_locked_60_days",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "domain_transfer_out_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "domain_transfer_out_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domains/{domain}/renewal": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "Get a domain's renewal",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          },
          {
            "in": "path",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "domain name"
          }
        ],
        "responses": {
          "200": {
            "description": "Automatic renewal, price, expiry, last renewal",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domains/{domain}/auto-renew": {
      "put": {
        "tags": [
          "Domains"
        ],
        "summary": "Turn automatic renewal on or off",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403. Turning it on applies the displayed price (renewal quote).",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          },
          {
            "in": "path",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "domain name"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "quote_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Setting saved",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "Quote expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/domains/{domain}/renewals": {
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Renew now",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403. Paid from the balance.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          },
          {
            "in": "path",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "domain name"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "quote_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Renewal submitted",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Already in progress or quote expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Named refusal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/dns/zones": {
      "get": {
        "tags": [
          "Domains"
        ],
        "summary": "List DNS zones hosted by Galon",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403. Domains bought elsewhere, served by Galon's name servers after delegation.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Zones, delegation status, name servers",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Domains"
        ],
        "summary": "Create a DNS zone for a domain bought elsewhere",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403. 50 zones per project.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Zone created",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "200": {
            "description": "Zone already claimed by this project",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "dns_zone_claimed, dns_zone_in_portfolio",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "dns_zone_domain_invalid, dns_zone_reserved, dns_zone_limit_reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/dns/zones/{domain}": {
      "delete": {
        "tags": [
          "Domains"
        ],
        "summary": "Delete a DNS zone",
        "description": "Administrator SESSION route (console). Served only when the service is open to the account (404 not_found otherwise). Non-administrator member: 403.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "project identifier"
          },
          {
            "in": "path",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "description": "domain name"
          }
        ],
        "responses": {
          "200": {
            "description": "Zone deleted",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/geo/geocode": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "Geocode an address or GPS text",
        "description": "Turn an address, a place name or GPS text into points. Scope `geo:geocode`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "description": "Address or place, 1 to 200 characters, or GPS text.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Results, 1 to 20 (default 5).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            }
          },
          {
            "in": "query",
            "name": "language",
            "required": false,
            "description": "Language of the names.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "de",
                "pt",
                "it",
                "ar",
                "zh",
                "ja",
                "ko",
                "hi",
                "bn",
                "ru",
                "id",
                "sw",
                "ha",
                "yo"
              ]
            }
          },
          {
            "in": "query",
            "name": "lat",
            "required": false,
            "description": "Bias near this latitude (with lon).",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "in": "query",
            "name": "lon",
            "required": false,
            "description": "Bias near this longitude (with lat).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": false,
            "description": "ISO 3166-1 alpha-2 filter.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FeatureCollection of points, attribution and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoFeatureCollection"
                }
              }
            }
          },
          "422": {
            "description": "geo_query_invalid, geo_coordinates_out_of_range, geo_coordinates_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/autocomplete": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "Suggest addresses as the user types",
        "description": "Suggestions for a partial address (wait 300 ms after the last keystroke and 3 characters). Served when its price is configured; otherwise 404. Scope `geo:geocode`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "description": "What the user typed: 3 to 200 characters, or GPS text.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Suggestions, 1 to 10 (default 5).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          },
          {
            "in": "query",
            "name": "language",
            "required": false,
            "description": "Language of the names.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "de",
                "pt",
                "it",
                "ar",
                "zh",
                "ja",
                "ko",
                "hi",
                "bn",
                "ru",
                "id",
                "sw",
                "ha",
                "yo"
              ]
            }
          },
          {
            "in": "query",
            "name": "lat",
            "required": false,
            "description": "Bias near this latitude (with lon).",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "in": "query",
            "name": "lon",
            "required": false,
            "description": "Bias near this longitude (with lat).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": false,
            "description": "ISO 3166-1 alpha-2 filter.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FeatureCollection of suggested points, attribution and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoFeatureCollection"
                }
              }
            }
          },
          "422": {
            "description": "geo_query_invalid (q shorter than 3 characters), geo_coordinates_out_of_range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/reverse": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "Find the address of a point",
        "description": "The nearest addresses of a point, given as lat and lon or as GPS text. Scope `geo:geocode`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "lat",
            "required": false,
            "description": "Latitude (with lon).",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "in": "query",
            "name": "lon",
            "required": false,
            "description": "Longitude (with lat).",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "in": "query",
            "name": "point",
            "required": false,
            "description": "GPS text, instead of lat and lon.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Results, 1 to 10 (default 1).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          },
          {
            "in": "query",
            "name": "language",
            "required": false,
            "description": "Language of the names.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "de",
                "pt",
                "it",
                "ar",
                "zh",
                "ja",
                "ko",
                "hi",
                "bn",
                "ru",
                "id",
                "sw",
                "ha",
                "yo"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FeatureCollection of points, attribution and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoFeatureCollection"
                }
              }
            }
          },
          "422": {
            "description": "geo_query_invalid, geo_coordinates_out_of_range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/places/search": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "Search places around a point",
        "description": "Places by name or category around a point. Scope `geo:geocode`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "description": "Name to search for.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "description": "Kind of place (give q, category or both).",
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "in": "query",
            "name": "lat",
            "required": true,
            "description": "Latitude of the centre.",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "in": "query",
            "name": "lon",
            "required": true,
            "description": "Longitude of the centre.",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "in": "query",
            "name": "radius",
            "required": false,
            "description": "Radius in metres, 100 to 50,000 (default 5,000).",
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 50000
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Results, 1 to 50 (default 10).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "in": "query",
            "name": "language",
            "required": false,
            "description": "Language of the names.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "de",
                "pt",
                "it",
                "ar",
                "zh",
                "ja",
                "ko",
                "hi",
                "bn",
                "ru",
                "id",
                "sw",
                "ha",
                "yo"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FeatureCollection of points, attribution and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoFeatureCollection"
                }
              }
            }
          },
          "422": {
            "description": "geo_query_invalid (field names the parameter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/route": {
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Compute a route",
        "description": "A route between 2 to 25 places, in travel order; the answer lists the resolved places. Scope `geo:route`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeoRouteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "FeatureCollection with the LineString, distance_m, duration_s, steps, waypoints, attribution and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoFeatureCollection"
                }
              }
            }
          },
          "422": {
            "description": "geo_query_invalid, geo_route_not_found, geo_coordinates_out_of_range, geo_coordinates_invalid, geo_address_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/matrix": {
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Compute a distance matrix",
        "description": "Durations and distances between 1 to 25 sources and 1 to 25 destinations (625 pairs at most), billed per pair. Served when its price is configured; otherwise 404. Scope `geo:route`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeoMatrixRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "durations_s and distances_m tables (null: no path), resolved places, attribution and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoMatrix"
                }
              }
            }
          },
          "422": {
            "description": "geo_matrix_too_large, geo_matrix_too_far, geo_coordinates_out_of_range, geo_coordinates_invalid, geo_address_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/isochrone": {
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Compute a reachable area",
        "description": "The areas reachable from a place within 1 to 4 times (minutes) or distances (meters). Served when its price is configured; otherwise 404. Scope `geo:route`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeoIsochroneRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "FeatureCollection of polygons, smallest first, centre, attribution and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoFeatureCollection"
                }
              }
            }
          },
          "422": {
            "description": "geo_query_invalid, geo_coordinates_out_of_range, geo_address_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/styles/basemap": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "Get the map style",
        "description": "A complete map style (light or dark) whose tile, font and icon URLs carry the key given in `?key=`. Scope `geo:maps`. Not billed. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "theme",
            "required": false,
            "description": "light (default) or dark.",
            "schema": {
              "type": "string",
              "enum": [
                "light",
                "dark"
              ]
            }
          },
          {
            "in": "query",
            "name": "language",
            "required": false,
            "description": "Language of the labels.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "de",
                "pt",
                "it",
                "ar",
                "zh",
                "ja",
                "ko",
                "hi",
                "bn",
                "ru",
                "id",
                "sw",
                "ha",
                "yo"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Map style (version 8)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Style document: sources, layers, glyphs, sprite."
                }
              }
            }
          },
          "422": {
            "description": "geo_query_invalid (field names the parameter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/tiles/{z}/{x}/{y}.mvt": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "Get a vector tile",
        "description": "A vector tile, zoom 0 to 15; 204 when there is no data at this address. Scope `geo:maps`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "z",
            "required": true,
            "description": "Zoom, 0 to 15.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "in": "path",
            "name": "x",
            "required": true,
            "description": "Column.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "in": "path",
            "name": "y",
            "required": true,
            "description": "Row.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vector tile (application/vnd.mapbox-vector-tile), Galon-Receipt header"
          },
          "204": {
            "description": "No tile at this address (not billed)"
          },
          "422": {
            "description": "geo_query_invalid (field names the parameter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/fonts/{fontstack}/{range}.pbf": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "Get map label glyphs",
        "description": "Glyphs of the map labels. Served when the map assets are configured. Scope `geo:maps`. Not billed. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "fontstack",
            "required": true,
            "description": "Font name, or a comma list.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "path",
            "name": "range",
            "required": true,
            "description": "Glyph range, N-(N+255).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,5}-[0-9]{1,5}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Glyphs (application/x-protobuf)"
          },
          "422": {
            "description": "geo_asset_not_found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geo/sprites/{file}": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "Get map icons",
        "description": "Icons of the map style (light or dark, 1x or 2x). Scope `geo:maps`. Not billed. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).",
        "security": [
          {
            "ApiKey": []
          },
          {
            "BrowserKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "file",
            "required": true,
            "description": "light.json, light.png, light@2x.json, light@2x.png, and the same for dark.",
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Icon sheet (image/png) or its index (application/json)"
          },
          "422": {
            "description": "geo_asset_not_found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "geo_balance_exhausted: the prepaid balance is used up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found: Geo, or this operation, is not served to this account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "geo_unavailable, geo_operation_unavailable, platform_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "geo_upstream_timeout: retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{project_id}/keys/browser": {
      "get": {
        "tags": [
          "Geo"
        ],
        "summary": "List the browser keys of a project",
        "description": "Browser keys (never their fingerprint), the scopes they can carry and the limits. Console session; a live key is created, changed, revoked or copied only by the admin and member roles (403 reserve_admin). 404 not_found when Geo is not served to this account.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "browser_keys, scopes, limits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserKeyList"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found, project_not_found, browser_key_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "browser_key_invalid, browser_key_origin_invalid, browser_key_origin_insecure, browser_key_origins_required, browser_key_origins_too_many, browser_key_scopes_invalid, browser_key_daily_cap_invalid, browser_key_name_invalid, browser_key_environment (field names the field)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Create a browser key",
        "description": "One screen: the sites (origins) allowed to use the key, the Geo scopes, an optional daily cap in billed units (default 10,000: one per request, one per matrix pair, one per address to geocode) and a name. The key is public by nature: it only works from the declared origins, within the daily cap; a request that would exceed it is refused whole. Console session; a live key is created, changed, revoked or copied only by the admin and member roles (403 reserve_admin). 404 not_found when Geo is not served to this account.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserKeyCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The key (api_key) and its settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserKey"
                }
              }
            }
          },
          "409": {
            "description": "browser_key_limit_reached (10 active keys per project)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found, project_not_found, browser_key_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "browser_key_invalid, browser_key_origin_invalid, browser_key_origin_insecure, browser_key_origins_required, browser_key_origins_too_many, browser_key_scopes_invalid, browser_key_daily_cap_invalid, browser_key_name_invalid, browser_key_environment (field names the field)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/keys/browser/{key_id}": {
      "patch": {
        "tags": [
          "Geo"
        ],
        "summary": "Change a browser key",
        "description": "Origins, daily cap or name; same id, same key. Scopes do not change: create another key. Console session; a live key is created, changed, revoked or copied only by the admin and member roles (403 reserve_admin). 404 not_found when Geo is not served to this account.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "description": "Browser key id.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserKeyUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "browser_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserKey"
                }
              }
            }
          },
          "409": {
            "description": "browser_key_revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found, project_not_found, browser_key_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "browser_key_invalid, browser_key_origin_invalid, browser_key_origin_insecure, browser_key_origins_required, browser_key_origins_too_many, browser_key_scopes_invalid, browser_key_daily_cap_invalid, browser_key_name_invalid, browser_key_environment (field names the field)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/keys/browser/{key_id}/revoke": {
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Revoke a browser key",
        "description": "Idempotent. Effective at the next request. Console session; a live key is created, changed, revoked or copied only by the admin and member roles (403 reserve_admin). 404 not_found when Geo is not served to this account.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "description": "Browser key id.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "browser_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserKey"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found, project_not_found, browser_key_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "browser_key_invalid, browser_key_origin_invalid, browser_key_origin_insecure, browser_key_origins_required, browser_key_origins_too_many, browser_key_scopes_invalid, browser_key_daily_cap_invalid, browser_key_name_invalid, browser_key_environment (field names the field)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/projects/{project_id}/keys/browser/{key_id}/copy": {
      "post": {
        "tags": [
          "Geo"
        ],
        "summary": "Copy a browser key",
        "description": "The key of an active browser key, to paste it again in a page. Console session; a live key is created, changed, revoked or copied only by the admin and member roles (403 reserve_admin). 404 not_found when Geo is not served to this account.",
        "security": [
          {
            "Session": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "description": "Browser key id.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "api_key"
          },
          "409": {
            "description": "browser_key_revoked, browser_key_not_copyable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized (session missing, expired or revoked)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "reserve_admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found, project_not_found, browser_key_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "browser_key_invalid, browser_key_origin_invalid, browser_key_origin_insecure, browser_key_origins_required, browser_key_origins_too_many, browser_key_scopes_invalid, browser_key_daily_cap_invalid, browser_key_name_invalid, browser_key_environment (field names the field)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "servers": [
        {
          "url": "/api/galon/v1",
          "description": "Console session (same origin as this document), not https://api.galon.ai/v1"
        }
      ]
    },
    "/search/v2/scrape": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Read one web page as Markdown",
        "description": "Reads one public http(s) page and returns the formats asked (markdown by default; html, rawHtml, links) with metadata. Galon reads as GalonBot, obeys robots.txt (RFC 9309: unreachable robots.txt means no read), sends at most one request per second per host and never reads private, local or reserved networks. No JavaScript rendering: waitFor and actions are refused (javascript_rendering_unavailable). A format Galon does not serve (screenshot, json, …) is refused by name (format_unsupported). One page is counted; timeout above 60000 ms is capped and said in `warning`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrawlScrapeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The page, read",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlScrapeResponse"
                }
              }
            }
          },
          "400": {
            "description": "body_invalid, content_type_invalid, field_unknown, field_invalid, url_invalid, url_blocked, ipv6_unsupported, format_unsupported, option_unsupported, javascript_rendering_unavailable, robots_disallowed, robots_unreachable, page_too_large, content_type_unsupported, too_many_redirects, tls_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_balance (only when a price grid is set)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (search:query)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "404": {
            "description": "not_found (service not open to this account)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (Retry-After), daily_limit_reached, quota_exceeded, tenant_quota_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "502": {
            "description": "site_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "503": {
            "description": "search_unavailable, search_auth_unavailable, executor_unavailable, executor_result_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "504": {
            "description": "scrape_timeout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          }
        }
      }
    },
    "/search/v2/map": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "List a site's page addresses",
        "description": "Lists the addresses of a site's pages from its sitemaps and the links of the start page, without reading their content. `search` keeps the addresses that contain a text first. Limit above 1000 is capped and said in `warning`. One call is counted.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrawlMapRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The addresses found",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlMapResponse"
                }
              }
            }
          },
          "400": {
            "description": "body_invalid, field_unknown, field_invalid, url_invalid, url_blocked, option_unsupported, robots_disallowed, robots_unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (search:query)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited, daily_limit_reached, quota_exceeded, tenant_quota_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "503": {
            "description": "search_unavailable, executor_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          }
        }
      }
    },
    "/search/v2/crawl": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Start a crawl job (read a site)",
        "description": "Starts a background reading of a site: breadth-first from the start address (and its sitemaps), within the start path unless crawlEntireDomain, at most `limit` pages (default 10, capped at 100 and said in `warning`), `maxDepth` hops (default 2, at most 5), 15 minutes, 2 running jobs per project. `Idempotency-Key` (optional): the same key with the same request returns the same job (header Idempotent-Replayed: true); a different request with the same key is 409. Each page read is counted. Results are kept 24 hours.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrawlStartRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job created (or replayed)",
            "headers": {
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string",
                  "const": "true"
                },
                "description": "Present when an earlier job with this Idempotency-Key is returned"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlStartResponse"
                }
              }
            }
          },
          "400": {
            "description": "body_invalid, field_unknown, field_invalid, url_invalid, url_blocked, option_unsupported (webhook, prompt, allowExternalLinks, regexOnFullURL), pattern_unsafe, javascript_rendering_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_balance (reservation of limit × page price, only when a price grid is set)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (search:query)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "409": {
            "description": "idempotency_conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "429": {
            "description": "crawl_limit_reached, daily_limit_reached, quota_exceeded, tenant_quota_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "503": {
            "description": "search_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          }
        }
      }
    },
    "/search/v2/crawl/{crawl_id}": {
      "parameters": [
        {
          "in": "path",
          "name": "crawl_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Read a crawl job: status and pages",
        "description": "Status (scraping, completed, failed, cancelled), counters and the pages read, 20 per answer; follow `next` while present. A job whose results expired (24 hours) is 404 crawl_expired. Not counted.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "skip",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "query_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (search:query)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "404": {
            "description": "not_found, crawl_not_found, crawl_expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "503": {
            "description": "search_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Search"
        ],
        "summary": "Cancel a running crawl job (see also GET …/errors below)",
        "description": "Stops a job that is queued or scraping; the pages already read stay readable until they expire. A finished job is returned as it is.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "The job's status after the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlCancelResponse"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (search:query)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "404": {
            "description": "not_found, crawl_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "503": {
            "description": "search_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          }
        }
      }
    },
    "/search/v2/crawl/{crawl_id}/errors": {
      "parameters": [
        {
          "in": "path",
          "name": "crawl_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Pages a crawl job could not read",
        "description": "The pages refused during a crawl (address, named code, public message) and, apart, the addresses the site's robots.txt forbids. No content, no internal detail. Not counted. Same 404s as the job itself (crawl_not_found, crawl_expired). Rate limit: the key's POST requests per minute do not apply to this GET.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "The refusals",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlErrorsResponse"
                }
              }
            }
          },
          "400": {
            "description": "query_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "401": {
            "description": "api_key_missing, api_key_invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing (search:query)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          },
          "404": {
            "description": "not_found, crawl_not_found, crawl_expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlError"
                }
              }
            }
          }
        }
      }
    },
    "/search/indexes": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "List search indexes",
        "description": "List the search indexes of this project. Use when choosing an index to search or fill. Before: nothing. Returns data: the indexes with name, language, fields and document count. Scope: search:query.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_list_indexes"
      },
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Create a search index",
        "description": "Create a search index from typed fields, or from a first batch of documents (schema inferred). Use when the app needs search over its own records (products, articles, tickets). Before: search_list_indexes (needs search query access), to reuse an existing index. Returns the index with its idx_ id (replayed with the same idempotency_key and fields). Scope: search:write. Reuse the same idempotency_key on retry.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$",
                    "description": "Index name: 1-63 chars, a-z 0-9 _ -, unique in the project."
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "en",
                      "fr",
                      "simple"
                    ],
                    "description": "Text language: en, fr, or simple (no stemming). Default en."
                  },
                  "typo_tolerance": {
                    "type": "boolean",
                    "description": "Match small typos by default. Default true."
                  },
                  "fields": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "name",
                        "type"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{0,63}$",
                          "description": "Field name (not id)."
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "keyword",
                            "keywords",
                            "number",
                            "boolean",
                            "date"
                          ],
                          "description": "text (full text), keyword, keywords (list), number, boolean or date (ISO 8601)."
                        },
                        "searchable": {
                          "type": "boolean",
                          "description": "Searched by q. Default true for text."
                        },
                        "weight": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 4,
                          "description": "Relevance weight of a searchable field, 1 to 4."
                        },
                        "filterable": {
                          "type": "boolean",
                          "description": "Usable in filter (keyword, keywords, number, boolean, date)."
                        },
                        "sortable": {
                          "type": "boolean",
                          "description": "Usable in sort (keyword, number, date)."
                        },
                        "facetable": {
                          "type": "boolean",
                          "description": "Countable in facets (keyword, keywords, boolean)."
                        }
                      },
                      "description": "One field of the schema."
                    },
                    "description": "The fields: at least one searchable. Every document field must be declared here. Required unless `documents` is given."
                  },
                  "documents": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1000,
                    "items": {
                      "type": "object",
                      "maxProperties": 52,
                      "description": "One document: an id (a-z A-Z 0-9 _ -) and its fields."
                    },
                    "description": "A first batch of documents, without `fields`: the schema is inferred from them and the batch is written in the same call, all or nothing."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_create_index"
      }
    },
    "/search/indexes/{name}": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Read a search index",
        "description": "Read an index: schema and document count. Use when checking which fields can be searched, filtered, sorted or faceted. Before: an index name from search_list_indexes. Returns the index and its fields. Scope: search:query.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "description": "Index name.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_get_index"
      },
      "delete": {
        "tags": [
          "Search"
        ],
        "summary": "Delete a search index",
        "description": "Delete an index and all its documents. Use when the user asks to remove an index for good. Before: confirm with the user: this cannot be undone. Returns deleted true. Scope: search:write.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "description": "Index name.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_delete_index"
      }
    },
    "/search/indexes/{name}/documents": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Add or update documents",
        "description": "Add or replace up to 1,000 documents in an index, all or nothing. Use when loading or syncing the app's records into an index. Before: search_get_index (needs search query access) for the fields. Returns the task: indexed, unchanged and stale counts, and the receipt. Scope: search:write. Reuse the same idempotency_key on retry.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "description": "Index name.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "documents": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1000,
                    "items": {
                      "type": "object",
                      "maxProperties": 52,
                      "description": "One document: an id (a-z A-Z 0-9 _ -), the declared fields, and an optional integer _version."
                    },
                    "description": "The documents. A document with an existing id replaces it."
                  }
                },
                "required": [
                  "documents"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_add_documents"
      }
    },
    "/search/indexes/{name}/query": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Search an index",
        "description": "Full-text search with filters, sorting, facets, pagination and highlights. Use when the user looks something up in the app's own data. Before: search_get_index for the fields. Returns hits (id, score, document, highlights), total, facets, took_ms and the receipt. Scope: search:query.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "description": "Index name.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "q": {
                    "type": "string",
                    "maxLength": 512,
                    "description": "Text to find. Quotes make a phrase, a leading - excludes a word. Empty: all documents."
                  },
                  "filter": {
                    "type": "object",
                    "maxProperties": 8,
                    "description": "Closed filter tree: {\"field\": f, \"eq\"|\"ne\"|\"in\"|\"gt\"|\"gte\"|\"lt\"|\"lte\"|\"exists\": v}, or {\"and\": [...]}, {\"or\": [...]}, {\"not\": {...}}."
                  },
                  "sort": {
                    "type": "array",
                    "maxItems": 3,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "field"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "A sortable field, or _score."
                        },
                        "order": {
                          "type": "string",
                          "enum": [
                            "asc",
                            "desc"
                          ],
                          "description": "asc or desc. Default asc."
                        }
                      },
                      "description": "One sort key."
                    },
                    "description": "Up to 3 sort keys; ties break by relevance then id."
                  },
                  "facets": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "A facetable field."
                    },
                    "description": "Fields to count values of (up to 100 values each)."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Page size, 1 to 100."
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000,
                    "description": "Results to skip, at most 1000."
                  },
                  "highlight": {
                    "type": "boolean",
                    "description": "Return escaped excerpts with <mark> tags. Default true."
                  },
                  "typo_tolerance": {
                    "type": "boolean",
                    "description": "Match small typos. Default: the index setting."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_query"
      }
    },
    "/search/indexes/{name}/documents/{document_id}": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Read a document",
        "description": "Read one document of an index by its id. Use when checking what an index holds for one record. Before: a document id from search_query. Returns the stored document. Scope: search:query.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "description": "Index name.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
            }
          },
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "description": "Document id.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_get_document"
      }
    },
    "/search/indexes/{name}/documents/delete": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Delete documents",
        "description": "Delete up to 1,000 documents of an index by id. Use when records were deleted in the app. Before: the ids to remove. Returns the task: deleted and not_found counts. Scope: search:write.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "description": "Index name.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1000,
                    "items": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
                      "description": "A document id."
                    },
                    "description": "The ids to delete."
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_delete_documents"
      }
    },
    "/search/tasks/{task_id}": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Read a search task",
        "description": "Read the result of a document batch. Use when following up on search_add_documents or search_delete_documents. Before: a task id from those tools. Returns the task status and counts. Scope: search:write.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "task_id",
            "required": true,
            "description": "Task id (tsk_...).",
            "schema": {
              "type": "string",
              "pattern": "^tsk_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:search_get_task"
      }
    },
    "/compute/flavors": {
      "get": {
        "tags": [
          "Compute"
        ],
        "summary": "List machine sizes",
        "description": "List the virtual machine sizes and their hourly price. Use when choosing a machine size. Before: nothing. Returns data (id, vcpu, memory_gib, disk_gib, price per hour running and stopped). Scope: compute:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:list_compute_flavors"
      }
    },
    "/compute/images": {
      "get": {
        "tags": [
          "Compute"
        ],
        "summary": "List machine images",
        "description": "List the operating systems a machine can run. Use when choosing an operating system. Before: nothing. Returns data (id, name, version, default_user, fingerprint_sha256). Scope: compute:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:list_compute_images"
      }
    },
    "/compute/ssh-keys": {
      "get": {
        "tags": [
          "Compute"
        ],
        "summary": "List SSH keys",
        "description": "List the SSH public keys of this project. Use when choosing which keys can log in to a new machine. Before: nothing. Returns data (key_ id, name, type, fingerprint). Scope: compute:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:list_ssh_keys"
      },
      "post": {
        "tags": [
          "Compute"
        ],
        "summary": "Add an SSH key",
        "description": "Register an SSH PUBLIC key (never a private key). Use when the user wants to log in to machines with a key not yet listed. Before: list_ssh_keys (needs compute read access); never send the private key. Returns the key with its key_ id and SHA256 fingerprint. Scope: compute:write.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "public_key": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 16384,
                    "description": "One line of a .pub file: type, key and an optional comment."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Label shown in the console."
                  }
                },
                "required": [
                  "public_key"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:add_ssh_key"
      }
    },
    "/compute/quotes": {
      "post": {
        "tags": [
          "Compute"
        ],
        "summary": "Quote a machine",
        "description": "Price a virtual machine before creating it. Use when before create_compute_instance (which needs compute write access); the quote lasts 30 minutes. Before: list_compute_flavors and list_compute_images (they need compute read access). Returns a quote (cq_ id) with hourly prices running and stopped and a monthly estimate. Scope: compute:quote.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "flavor": {
                    "type": "string",
                    "enum": [
                      "1vcpu-1gb",
                      "2vcpu-4gb",
                      "4vcpu-8gb"
                    ],
                    "description": "Machine size: vCPU and memory (disk included)."
                  },
                  "image": {
                    "type": "string",
                    "enum": [
                      "ubuntu-24.04",
                      "debian-12"
                    ],
                    "description": "Operating system image."
                  }
                },
                "required": [
                  "flavor",
                  "image"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:quote_compute_instance"
      }
    },
    "/compute/instances": {
      "post": {
        "tags": [
          "Compute"
        ],
        "summary": "Create a machine",
        "description": "Create a Linux virtual machine billed per minute. Use when the user asked for a machine and accepted the quote; it costs money until deleted. Before: add_ssh_key and quote_compute_instance (needs compute quote access), same flavor and image. Returns the machine (provisioning); poll get_compute_instance (needs compute read access) until running, then use its ssh command. Scope: compute:write. Needs a prepaid balance.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$",
                    "description": "Host name: a-z 0-9 and -, starting with a letter."
                  },
                  "flavor": {
                    "type": "string",
                    "enum": [
                      "1vcpu-1gb",
                      "2vcpu-4gb",
                      "4vcpu-8gb"
                    ],
                    "description": "Machine size: vCPU and memory (disk included)."
                  },
                  "image": {
                    "type": "string",
                    "enum": [
                      "ubuntu-24.04",
                      "debian-12"
                    ],
                    "description": "Operating system image."
                  },
                  "ssh_key_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 5,
                    "items": {
                      "type": "string",
                      "pattern": "^key_[0-9a-f]{24}$"
                    },
                    "description": "1 to 5 key ids from list_ssh_keys (needs compute read access) or add_ssh_key."
                  },
                  "quote_id": {
                    "type": "string",
                    "pattern": "^cq_[0-9a-f]{24}$",
                    "description": "Quote id from quote_compute_instance (cq_..., needs compute quote access)."
                  }
                },
                "required": [
                  "name",
                  "flavor",
                  "image",
                  "ssh_key_ids",
                  "quote_id"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:create_compute_instance"
      },
      "get": {
        "tags": [
          "Compute"
        ],
        "summary": "List machines",
        "description": "List the virtual machines of this project. Use when finding a machine or its vm_ id. Before: nothing. Returns data (machines with state, size, image and ssh access). Scope: compute:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:list_compute_instances"
      }
    },
    "/compute/instances/{instance_id}": {
      "get": {
        "tags": [
          "Compute"
        ],
        "summary": "Read a machine",
        "description": "Read a virtual machine: state, SSH access, host keys. Use when after create or a power action, until the state is stable. Before: a vm_ id. Returns the machine, its ssh command and the host key fingerprints to check on first login; balance_stopped_at and delete_scheduled_at when the machine is stopped for lack of balance. Scope: compute:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "description": "Machine id (vm_...).",
            "schema": {
              "type": "string",
              "pattern": "^vm_[0-9a-f]{24}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:get_compute_instance"
      },
      "delete": {
        "tags": [
          "Compute"
        ],
        "summary": "Delete a machine",
        "description": "Delete a virtual machine and its disk. Cannot be undone. Use when the user explicitly asked to delete this machine and its data. Before: get_compute_instance (needs compute read access), to read its exact name. Returns the machine in state deleting. Scope: compute:delete.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "description": "Machine id (vm_...).",
            "schema": {
              "type": "string",
              "pattern": "^vm_[0-9a-f]{24}$"
            }
          },
          {
            "in": "query",
            "name": "confirm",
            "required": true,
            "description": "The exact machine name, as confirmation.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 63
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:delete_compute_instance"
      }
    },
    "/compute/instances/{instance_id}/start": {
      "post": {
        "tags": [
          "Compute"
        ],
        "summary": "Start a machine",
        "description": "Start a stopped virtual machine. Use when the machine is stopped and the user wants it running again; billing resumes. Before: get_compute_instance (state stopped, needs compute read access). Returns the machine in state starting. Scope: compute:power.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "description": "Machine id (vm_...).",
            "schema": {
              "type": "string",
              "pattern": "^vm_[0-9a-f]{24}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:start_compute_instance"
      }
    },
    "/compute/instances/{instance_id}/stop": {
      "post": {
        "tags": [
          "Compute"
        ],
        "summary": "Stop a machine",
        "description": "Stop a running virtual machine (its disk is still billed). Use when the user wants to pause a machine without deleting it. Before: get_compute_instance (state running, needs compute read access). Returns the machine in state stopping. Scope: compute:power.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "description": "Machine id (vm_...).",
            "schema": {
              "type": "string",
              "pattern": "^vm_[0-9a-f]{24}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:stop_compute_instance"
      }
    },
    "/compute/instances/{instance_id}/reboot": {
      "post": {
        "tags": [
          "Compute"
        ],
        "summary": "Reboot a machine",
        "description": "Reboot a running virtual machine. Use when the machine is running but stuck. Before: get_compute_instance (state running, needs compute read access). Returns the machine in state rebooting. Scope: compute:power.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "description": "Machine id (vm_...).",
            "schema": {
              "type": "string",
              "pattern": "^vm_[0-9a-f]{24}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:reboot_compute_instance"
      }
    },
    "/compute/usage": {
      "get": {
        "tags": [
          "Compute"
        ],
        "summary": "Machine usage",
        "description": "Minutes and amounts of the virtual machines this month. Use when checking what the machines cost this month. Before: nothing. Returns per machine: vCPU, memory and disk minutes, outbound bytes and amount in micro-USD. Scope: compute:usage.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:get_compute_usage"
      }
    },
    "/functions/pricing": {
      "get": {
        "tags": [
          "Functions"
        ],
        "summary": "Read Functions prices",
        "description": "Read the public prices and limits of Galon Functions. Use when before deploying a function, to tell the user what it costs. Before: nothing. Returns pricing: prices per million requests and per million CPU ms (USD), alerts and limits. Scope: job:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:get_functions_pricing"
      }
    },
    "/functions/sources": {
      "post": {
        "tags": [
          "Functions"
        ],
        "summary": "Upload a function source",
        "description": "Upload the JavaScript module of a function. Use when the function code is ready to deploy. Before: get_functions_pricing (needs job read access). Returns source (source_ref art_..., source_sha256, size_bytes) for deploy_function. Scope: functions:deploy.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/javascript": {
              "schema": {
                "type": "string",
                "minLength": 1,
                "maxLength": 400000,
                "description": "The ES module source; it must have an export default handler."
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:upload_function_source"
      }
    },
    "/functions/deployments": {
      "post": {
        "tags": [
          "Functions"
        ],
        "summary": "Deploy a function",
        "description": "Deploy an uploaded source as a named function. Use when the user wants the function online. Before: upload_function_source. Returns the job (id, status) and the function (ref, url); then get_function_job (needs job read access) until done. Scope: functions:deploy.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,39}$",
                    "description": "Function name: lowercase letters, digits and hyphens, starting with a letter."
                  },
                  "source_ref": {
                    "type": "string",
                    "pattern": "^art_[0-9a-f]{32}$",
                    "description": "source_ref from upload_function_source."
                  },
                  "source_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "source_sha256 from upload_function_source."
                  },
                  "environment": {
                    "type": "string",
                    "enum": [
                      "test",
                      "live"
                    ],
                    "description": "Environment: it must be the environment of the key."
                  },
                  "compatibility_date": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Runtime compatibility date, YYYY-MM-DD, 2021-01-01 or later."
                  },
                  "previous_revision_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Revision this deploy replaces, to refuse a concurrent change."
                  }
                },
                "required": [
                  "name",
                  "source_ref",
                  "source_sha256",
                  "environment",
                  "compatibility_date"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:deploy_function"
      }
    },
    "/functions/jobs/{job_id}": {
      "get": {
        "tags": [
          "Functions"
        ],
        "summary": "Read a function job",
        "description": "Read a Functions deploy or delete job. Use when a deploy or delete job was accepted. Before: deploy_function or delete_function (they need functions deploy access). Returns the job: status, error code, revision and public url. Scope: job:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "description": "Job id from deploy_function or delete_function (they need functions deploy access).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:get_function_job"
      }
    },
    "/functions/deletions": {
      "post": {
        "tags": [
          "Functions"
        ],
        "summary": "Delete a function revision",
        "description": "Delete a deployed revision of a function. Use when the user explicitly asks to take a function offline. Before: the user's clear yes. Returns the job (id, status); then get_function_job (needs job read access). Scope: functions:deploy.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,39}$",
                    "description": "Function name: lowercase letters, digits and hyphens, starting with a letter."
                  },
                  "revision_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Revision to delete, from get_function_job (needs job read access)."
                  },
                  "environment": {
                    "type": "string",
                    "enum": [
                      "test",
                      "live"
                    ],
                    "description": "Environment: it must be the environment of the key."
                  }
                },
                "required": [
                  "name",
                  "revision_sha256",
                  "environment"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:delete_function"
      }
    },
    "/mail-pro/domains/{rid}/storage": {
      "post": {
        "tags": [
          "Mail"
        ],
        "summary": "Buy storage for a domain",
        "description": "Add storage packs to a Mail Pro domain when its included storage is used up. Use when create_mailbox failed with mailpro.storage.domain_storage_exceeded and the user wants more. Before: get_mailbox_domain (needs mailpro read access) and the user's yes to the charge. Returns the domain with its new storage limit and billed_minor. Scope: mailpro:write. 422 mailpro.request.invalid without confirm equal to the domain.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "rid",
            "required": true,
            "description": "Resource id (UUID) returned by the list or create tool.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "packs": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "description": "Number of packs; get_mailbox_domain (needs mailpro read access) gives storage.pack_mib and pack_minor_per_month."
                  },
                  "confirm": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 253,
                    "description": "The domain name, typed again, once the user has confirmed the monthly charge."
                  }
                },
                "required": [
                  "packs",
                  "confirm"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:buy_mailbox_storage"
      }
    },
    "/backend/databases": {
      "get": {
        "tags": [
          "Backend"
        ],
        "summary": "List databases",
        "description": "List the Galon Backend databases of this project. Use when checking which databases exist. Before: nothing. Returns databases with id, name, status and whether they are hosted. Scope: database:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:list_databases"
      }
    },
    "/backend/hosted/databases": {
      "post": {
        "tags": [
          "Backend"
        ],
        "summary": "Create a hosted database",
        "description": "Create a hosted PostgreSQL database in one step. Use when the app needs a database. Before: list_databases (needs database read access). Returns the database and, this once, its connection url: store it as an environment secret, never print it. Scope: database:create ; the project balance must cover 24 hours.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{1,38}[a-z0-9]$",
                    "description": "Database name: 3 to 40 lowercase letters, digits and hyphens."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:create_database"
      }
    },
    "/backend/databases/{database_id}": {
      "get": {
        "tags": [
          "Backend"
        ],
        "summary": "Read a database",
        "description": "Read a database: status, size and limits, address masked. Use when checking one database. Before: list_databases. Returns the database, with its price and limits. Scope: database:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "database_id",
            "required": true,
            "description": "Resource id (UUID) returned by the list or create tool.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:get_database"
      }
    },
    "/backend/databases/{database_id}/migrations": {
      "post": {
        "tags": [
          "Backend"
        ],
        "summary": "Apply SQL migrations",
        "description": "Queue versioned SQL migrations on a database. Use when the schema must change. Before: get_database (needs database read access); the user's yes for a live database. Returns the operation (id, status); then get_database_operation (needs database read access). Scope: database:create. A live database requires confirm: true.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "database_id",
            "required": true,
            "description": "Resource id (UUID) returned by the list or create tool.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "migrations": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "version",
                        "name",
                        "sql"
                      ],
                      "properties": {
                        "version": {
                          "type": "string",
                          "pattern": "^[0-9]{1,20}$",
                          "description": "Increasing version number."
                        },
                        "name": {
                          "type": "string",
                          "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$",
                          "description": "Short migration name."
                        },
                        "sql": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 262144,
                          "description": "SQL, without BEGIN or COMMIT: each migration runs in its own transaction."
                        }
                      },
                      "description": "One migration."
                    },
                    "description": "Migrations, oldest first; an applied version is skipped."
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "Required true for a live database: the user said yes."
                  }
                },
                "required": [
                  "migrations"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:apply_migrations"
      }
    },
    "/backend/operations/{operation_id}": {
      "get": {
        "tags": [
          "Backend"
        ],
        "summary": "Read a database operation",
        "description": "Read a migration or backup operation. Use when a migration or backup was queued. Before: apply_migrations (needs database create access). Returns the operation with its status and error code. Scope: database:read.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "operation_id",
            "required": true,
            "description": "Operation id.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:get_database_operation"
      }
    },
    "/deploy/journeys/{journey_id}/preview": {
      "delete": {
        "tags": [
          "Deploy"
        ],
        "summary": "Delete a preview",
        "description": "Remove the preview of a deploy: its address stops answering (410). Use when the user wants a preview taken offline. Before: a deploy whose preview is ready (status ready). Returns the deploy with status deleted; 202 when the removal is still running (call again); 409 deploy_preview_in_production when this preview is the production release (never removed). Destructive: ask the person first. Scope: deploy:create.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "journey_id",
            "required": true,
            "description": "Deploy id from start_deploy.",
            "schema": {
              "type": "string",
              "pattern": "^djy_[0-9a-f]{32}$"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Success: the JSON body the route returns (see the description for its fields).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "description": "Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-galon-source": "mcp:delete_preview"
      }
    },
    "/auth/signup": {
      "post": {
        "summary": "Self-service sign-up: sends a code by email",
        "tags": [
          "Account"
        ],
        "security": [],
        "servers": [
          {
            "url": "https://cloud.galon.ai/api/galon/v1"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password",
                  "organization_name",
                  "terms"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 12
                  },
                  "organization_name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "billing_country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "terms": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "version",
                      "language",
                      "read",
                      "commit"
                    ],
                    "properties": {
                      "version": {
                        "type": "string",
                        "description": "terms_version from GET /auth/providers"
                      },
                      "language": {
                        "type": "string"
                      },
                      "read": {
                        "const": true
                      },
                      "commit": {
                        "const": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Self-service sign-up: sends a code by email"
          }
        }
      }
    },
    "/auth/signup/verify": {
      "post": {
        "summary": "Verify the code: creates the account and opens a session",
        "tags": [
          "Account"
        ],
        "security": [],
        "servers": [
          {
            "url": "https://cloud.galon.ai/api/galon/v1"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "code"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verify the code: creates the account and opens a session"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "gln_test_... or gln_live_..."
      },
      "Session": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Galon session held by the application, never by an integrator"
      },
      "BrowserKey": {
        "type": "apiKey",
        "in": "query",
        "name": "key",
        "description": "Browser key gln_pk_test_… or gln_pk_live_… (also accepted as Authorization: Bearer): Geo only, from the origins declared on the key, within its daily cap."
      }
    },
    "parameters": {
      "ProjectId": {
        "name": "project_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "JobId": {
        "name": "job_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        }
      },
      "QuoteId": {
        "name": "quote_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^dqt_[0-9a-f]{64}$"
        }
      },
      "OrderId": {
        "name": "order_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^dor_[0-9a-f]{64}$"
        }
      },
      "NoticeId": {
        "name": "notice_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 8,
          "maxLength": 200
        }
      }
    },
    "schemas": {
      "ProjectCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ],
            "default": "test"
          }
        }
      },
      "KeyCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scopes"
        ],
        "properties": {
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "description": "Exact least-privilege scopes. Service wildcards are intentionally excluded from the public contract.",
            "items": {
              "type": "string",
              "enum": [
                "mail:send",
                "build:create",
                "build:android",
                "build:read",
                "build:cancel",
                "artifact:read",
                "source:publish",
                "deploy:create",
                "database:create",
                "job:read",
                "job:cancel",
                "domain:lookup",
                "domain:quote",
                "domain:read",
                "domain:purchase",
                "domain:transfer",
                "domain:renew",
                "domain:restore",
                "domain:update",
                "domain:dns_read",
                "domain:dns_write",
                "domain:connect",
                "contact:read",
                "contact:write",
                "template:read",
                "template:write",
                "validation:check",
                "usage:read"
              ]
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "restricted_domain": {
            "type": "string",
            "description": "Verified sending domain of the project to which this key remains restricted."
          }
        }
      },
      "ApiKeyMetadata": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "prefix",
          "scopes",
          "status",
          "environment",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "prefix": {
            "type": "string",
            "minLength": 12,
            "maxLength": 12
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "enum": [
              "active",
              "revoquee"
            ]
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "expires_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "type": "string"
          }
        }
      },
      "ApiKeyCreateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "api_key",
          "id",
          "prefix",
          "scopes",
          "environment",
          "expires_at",
          "warning"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "writeOnly": true
          },
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "prefix": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "warning": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "restricted_domain": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyWarning"
            },
            "description": "Named warnings: the key was created, but a scope does not work yet (for example mail:send before Mail can send). Optional."
          }
        }
      },
      "ApiKeyWarning": {
        "type": "object",
        "required": [
          "code",
          "scope",
          "reason",
          "message"
        ],
        "description": "A warning on a created key.",
        "properties": {
          "code": {
            "enum": [
              "mail_not_ready"
            ],
            "description": "Stable warning code."
          },
          "scope": {
            "type": "string",
            "description": "The scope concerned, e.g. mail:send."
          },
          "reason": {
            "enum": [
              "mail_subscription_inactive",
              "mail_no_verified_domain",
              "mail_account_not_ready"
            ],
            "description": "Why the scope does not work yet."
          },
          "message": {
            "type": "string",
            "description": "What to do, for a person."
          }
        }
      },
      "ScopeNotAvailableError": {
        "type": "object",
        "description": "422 scope_not_available: a requested scope is closed to this account (GET /console/available-scopes).",
        "properties": {
          "detail": {
            "type": "object",
            "required": [
              "code",
              "message",
              "scopes"
            ],
            "properties": {
              "code": {
                "enum": [
                  "scope_not_available"
                ],
                "description": "Stable error code."
              },
              "message": {
                "type": "string",
                "description": "Human-readable message."
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The requested scopes that are closed."
              },
              "next_action": {
                "$ref": "#/components/schemas/NextAction"
              }
            }
          }
        }
      },
      "ApiKeyListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "keys"
        ],
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyMetadata"
            }
          }
        }
      },
      "ApiKeyResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key"
        ],
        "properties": {
          "key": {
            "$ref": "#/components/schemas/ApiKeyMetadata"
          }
        }
      },
      "JobCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "input"
        ],
        "properties": {
          "type": {
            "enum": [
              "build.application_web",
              "build.application_android",
              "domain.lookup",
              "domain.quote",
              "domain.inspect",
              "domain.dns.read"
            ]
          },
          "input": {
            "type": "object"
          }
        }
      },
      "Job": {
        "type": "object",
        "required": [
          "schema",
          "object",
          "id",
          "project_id",
          "created_at",
          "state_version",
          "type",
          "status",
          "attempt_count",
          "started_at",
          "completed_at",
          "result",
          "error_code",
          "final",
          "cancellable",
          "links"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.job.v1"
          },
          "object": {
            "const": "job"
          },
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "state_version": {
            "type": "string",
            "pattern": "^jv_[0-9a-f]{64}$"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed",
              "cancelled",
              "uncertain"
            ]
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "result": {
            "type": "object"
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "final": {
            "type": "boolean"
          },
          "cancellable": {
            "type": "boolean"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "Present when the email is scheduled."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "self",
              "cancel"
            ],
            "description": "Canonical relative links. An API key receives /v1/jobs/{id}; the console receives /v1/projects/{project_id}/jobs/{id}.",
            "properties": {
              "self": {
                "type": "string",
                "pattern": "^/v1/(?:jobs/[0-9a-f]{64}|projects/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/jobs/[0-9a-f]{64})$"
              },
              "cancel": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^/v1/(?:jobs/[0-9a-f]{64}|projects/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/jobs/[0-9a-f]{64})/cancel$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "artifacts": {
                "type": "string",
                "pattern": "^/v1/builds/[0-9a-f]{64}/artifacts$"
              }
            }
          }
        }
      },
      "EmailJob": {
        "type": "object",
        "description": "A Galon Mail job: the same fields as Job.",
        "required": [
          "schema",
          "object",
          "id",
          "project_id",
          "created_at",
          "state_version",
          "type",
          "status",
          "attempt_count",
          "started_at",
          "completed_at",
          "result",
          "error_code",
          "final",
          "cancellable",
          "links"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.job.v1"
          },
          "object": {
            "const": "job"
          },
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "state_version": {
            "type": "string",
            "pattern": "^jv_[0-9a-f]{64}$"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed",
              "cancelled",
              "uncertain"
            ]
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "result": {
            "type": "object"
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "final": {
            "type": "boolean"
          },
          "cancellable": {
            "type": "boolean"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "Present when the email is scheduled."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "self",
              "cancel"
            ],
            "description": "Canonical relative links. An API key receives /v1/jobs/{id}; the console receives /v1/projects/{project_id}/jobs/{id}.",
            "properties": {
              "self": {
                "type": "string",
                "pattern": "^/v1/(?:jobs/[0-9a-f]{64}|projects/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/jobs/[0-9a-f]{64})$"
              },
              "cancel": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^/v1/(?:jobs/[0-9a-f]{64}|projects/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/jobs/[0-9a-f]{64})/cancel$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "artifacts": {
                "type": "string",
                "pattern": "^/v1/builds/[0-9a-f]{64}/artifacts$"
              }
            }
          }
        }
      },
      "JobResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "job"
        ],
        "properties": {
          "job": {
            "$ref": "#/components/schemas/Job"
          }
        }
      },
      "JobListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "jobs",
          "next_cursor",
          "limit",
          "status"
        ],
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "status": {
            "oneOf": [
              {
                "enum": [
                  "en_file",
                  "en_cours",
                  "reussi",
                  "echoue",
                  "annule",
                  "indetermine"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string"
          }
        }
      },
      "JobCancelResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "job",
          "cancelled",
          "changed",
          "final"
        ],
        "properties": {
          "job": {
            "$ref": "#/components/schemas/Job"
          },
          "cancelled": {
            "type": "boolean"
          },
          "changed": {
            "type": "boolean"
          },
          "final": {
            "type": "boolean"
          }
        }
      },
      "JobSubmissionIdempotency": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "same_key_required_for_retry",
          "key_returned"
        ],
        "properties": {
          "status": {
            "enum": [
              "created",
              "replayed"
            ]
          },
          "same_key_required_for_retry": {
            "const": true
          },
          "key_returned": {
            "const": false
          }
        }
      },
      "JobSubmissionResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "object",
          "job",
          "replayed",
          "idempotency"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.submission.v1"
          },
          "object": {
            "const": "job_submission"
          },
          "job": {
            "$ref": "#/components/schemas/Job"
          },
          "replayed": {
            "type": "boolean"
          },
          "idempotency": {
            "$ref": "#/components/schemas/JobSubmissionIdempotency"
          }
        }
      },
      "Tool": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "version",
          "description",
          "scope",
          "asynchrone",
          "queue",
          "risk",
          "approval",
          "required",
          "optional"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "const": "v1"
          },
          "description": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "asynchrone": {
            "const": true
          },
          "queue": {
            "type": "string"
          },
          "risk": {
            "enum": [
              "faible",
              "moyen",
              "eleve"
            ]
          },
          "approval": {
            "enum": [
              "aucune",
              "mandat",
              "humaine_exacte"
            ]
          },
          "required": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "optional": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ToolCatalogResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tools",
          "project_id",
          "environment"
        ],
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tool"
            }
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "unavailable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolUnavailable"
            },
            "description": "Tools of the catalogue this key cannot call now, with the reason and what to do next. Optional."
          }
        }
      },
      "ToolUnavailable": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "scope",
          "reason",
          "next_action"
        ],
        "description": "A tool that is not available to this key, and why.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tool id, as in tools."
          },
          "scope": {
            "type": "string",
            "description": "Scope the tool needs."
          },
          "reason": {
            "enum": [
              "scope_missing",
              "environment",
              "not_open",
              "tenant_capability"
            ],
            "description": "scope_missing: the key lacks the scope; environment: open in the other environment (test or live); not_open: the service is not open to this project; tenant_capability: the account lacks this capability."
          },
          "next_action": {
            "$ref": "#/components/schemas/NextAction"
          }
        }
      },
      "BuildCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "plan"
        ],
        "properties": {
          "plan": {
            "type": "object"
          }
        }
      },
      "BuildResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "build"
        ],
        "properties": {
          "build": {
            "$ref": "#/components/schemas/Job"
          }
        }
      },
      "BuildCreateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "object",
          "job",
          "replayed",
          "idempotency",
          "build"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.submission.v1"
          },
          "object": {
            "const": "job_submission"
          },
          "job": {
            "$ref": "#/components/schemas/Job"
          },
          "replayed": {
            "type": "boolean"
          },
          "idempotency": {
            "$ref": "#/components/schemas/JobSubmissionIdempotency"
          },
          "build": {
            "$ref": "#/components/schemas/Job"
          }
        }
      },
      "Artifact": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "schema",
          "object",
          "id",
          "project_id",
          "created_at",
          "state_version",
          "job_id",
          "type",
          "filename",
          "content_type",
          "sha256",
          "size_bytes"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.artifact.v1"
          },
          "object": {
            "const": "artifact"
          },
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "state_version": {
            "type": "string"
          },
          "job_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "Event": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "object",
          "id",
          "project_id",
          "created_at",
          "state_version",
          "type",
          "data"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.event.v1"
          },
          "object": {
            "const": "event"
          },
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "state_version": {
            "type": "string",
            "pattern": "^ev_[0-9a-f]{64}$"
          },
          "type": {
            "enum": [
              "job.queued",
              "job.started",
              "job.succeeded",
              "job.failed",
              "job.cancelled",
              "job.uncertain",
              "artifact.ready",
              "broadcast.sent",
              "broadcast.completed",
              "deploy.created",
              "deploy.succeeded",
              "deploy.failed",
              "deploy.promoted",
              "deploy.rolled_back"
            ]
          },
          "data": {
            "type": "object"
          }
        }
      },
      "ArtifactListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "artifacts"
        ],
        "properties": {
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Artifact"
            }
          }
        }
      },
      "MailSend": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "from_email",
          "subject"
        ],
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "text"
                ]
              },
              {
                "required": [
                  "html"
                ]
              }
            ]
          },
          {
            "oneOf": [
              {
                "required": [
                  "to"
                ]
              },
              {
                "required": [
                  "to_email"
                ]
              }
            ]
          }
        ],
        "properties": {
          "from_email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "to_email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "description": "Legacy contract: a single recipient. Mutually exclusive with to."
          },
          "to": {
            "description": "One address or a list; to, cc and bcc combined: at most 50 distinct recipients.",
            "oneOf": [
              {
                "type": "string",
                "format": "email",
                "maxLength": 254
              },
              {
                "type": "array",
                "minItems": 1,
                "maxItems": 50,
                "items": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 254
                }
              }
            ]
          },
          "cc": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string",
              "format": "email",
              "maxLength": 254
            }
          },
          "bcc": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string",
              "format": "email",
              "maxLength": 254
            },
            "description": "Never revealed: each recipient receives their own copy."
          },
          "attachments": {
            "type": "array",
            "maxItems": 10,
            "description": "At most 40 MB once encoded (MIME estimate); executable extensions, types and signatures refused.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "filename",
                "content"
              ],
              "properties": {
                "filename": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                "content": {
                  "type": "string",
                  "contentEncoding": "base64",
                  "writeOnly": true
                },
                "content_type": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]{0,126}/[a-z0-9][a-z0-9!#$&^_.+-]{0,126}$"
                }
              }
            }
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 with time zone, at most 72 h ahead, at most 5 min in the past; rounded to the second (UTC)."
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 49152
          },
          "html": {
            "type": "string",
            "minLength": 1,
            "maxLength": 49152
          },
          "reply_to": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "tags": {
            "type": "object",
            "maxProperties": 10,
            "propertyNames": {
              "pattern": "^(?!galon_)[A-Za-z0-9_-]{1,64}$"
            },
            "additionalProperties": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,128}$"
            }
          }
        }
      },
      "MailBatch": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "emails"
        ],
        "properties": {
          "emails": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/MailSend"
                },
                {
                  "not": {
                    "required": [
                      "attachments"
                    ]
                  }
                }
              ]
            }
          }
        }
      },
      "EmailResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "$ref": "#/components/schemas/EmailJob"
          }
        }
      },
      "EmailUpdate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scheduled_at"
        ],
        "properties": {
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EmailUpdateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "email",
          "scheduled_at"
        ],
        "properties": {
          "email": {
            "$ref": "#/components/schemas/EmailJob"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EmailSendResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "object",
          "job",
          "replayed",
          "idempotency",
          "email"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.submission.v1"
          },
          "object": {
            "const": "job_submission"
          },
          "job": {
            "$ref": "#/components/schemas/EmailJob"
          },
          "replayed": {
            "type": "boolean"
          },
          "idempotency": {
            "$ref": "#/components/schemas/JobSubmissionIdempotency"
          },
          "email": {
            "$ref": "#/components/schemas/EmailJob"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EmailBatchItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "index",
          "job",
          "replayed"
        ],
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 0,
            "maximum": 99
          },
          "job": {
            "$ref": "#/components/schemas/EmailJob"
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "EmailBatchResponse": {
        "type": "object",
        "additionalProperties": false,
        "description": "Closed contract of the batch. atomic=true covers job registration only. An exact replay keeps the same ordered list and returns the same jobs.",
        "required": [
          "schema",
          "object",
          "data",
          "atomic",
          "replayed",
          "idempotency",
          "emails"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.batch-submission.v1"
          },
          "object": {
            "const": "job_submission_batch"
          },
          "data": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/EmailBatchItem"
            }
          },
          "atomic": {
            "const": true,
            "description": "All-or-nothing initial registration; does not cover execution or delivery."
          },
          "replayed": {
            "type": "boolean"
          },
          "idempotency": {
            "$ref": "#/components/schemas/JobSubmissionIdempotency"
          },
          "emails": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "Compatibility alias for the jobs in data, in the same order.",
            "items": {
              "$ref": "#/components/schemas/EmailJob"
            }
          }
        }
      },
      "EmailJournalStatus": {
        "enum": [
          "queued",
          "scheduled",
          "sent",
          "delivered",
          "delivery_delayed",
          "bounced",
          "complained",
          "failed",
          "suppressed",
          "opened",
          "clicked",
          "canceled"
        ]
      },
      "EmailJournalEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "occurred_at"
        ],
        "properties": {
          "type": {
            "$ref": "#/components/schemas/EmailJournalStatus"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "bounce": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "subType",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "subType": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "click": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "link",
              "timestamp"
            ],
            "properties": {
              "link": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "timestamp": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "open": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "timestamp"
            ],
            "properties": {
              "timestamp": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "delivery_delayed": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string"
              }
            }
          },
          "complaint": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "failed": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "reason"
            ],
            "properties": {
              "reason": {
                "type": "string"
              }
            }
          },
          "suppressed": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "message"
            ],
            "properties": {
              "type": {
                "const": "OnProjectSuppressionList"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "EmailJournalEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "from",
          "to",
          "cc",
          "bcc",
          "reply_to",
          "subject",
          "tags",
          "created_at",
          "scheduled_at",
          "last_event",
          "content_retained"
        ],
        "properties": {
          "object": {
            "const": "email"
          },
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "cc": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "bcc": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "reply_to": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "scheduled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_event": {
            "$ref": "#/components/schemas/EmailJournalStatus"
          },
          "content_retained": {
            "type": "boolean"
          },
          "html": {
            "type": [
              "string",
              "null"
            ]
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailJournalEvent"
            }
          }
        }
      },
      "EmailJournalListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "has_more",
          "data"
        ],
        "properties": {
          "object": {
            "const": "list"
          },
          "has_more": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailJournalEntry"
            }
          }
        }
      },
      "EmailMetricsRates": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "delivery",
          "bounce",
          "complaint",
          "open",
          "click"
        ],
        "properties": {
          "delivery": {
            "type": [
              "number",
              "null"
            ]
          },
          "bounce": {
            "type": [
              "number",
              "null"
            ]
          },
          "complaint": {
            "type": [
              "number",
              "null"
            ]
          },
          "open": {
            "type": [
              "number",
              "null"
            ]
          },
          "click": {
            "type": [
              "number",
              "null"
            ]
          }
        }
      },
      "EmailMetricsCounters": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "sent",
          "delivered",
          "delivery_delayed",
          "bounced",
          "complained",
          "opened",
          "clicked",
          "failed",
          "rates"
        ],
        "properties": {
          "sent": {
            "type": "integer"
          },
          "delivered": {
            "type": "integer"
          },
          "delivery_delayed": {
            "type": "integer"
          },
          "bounced": {
            "type": "integer"
          },
          "complained": {
            "type": "integer"
          },
          "opened": {
            "type": "integer"
          },
          "clicked": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "rates": {
            "$ref": "#/components/schemas/EmailMetricsRates"
          }
        }
      },
      "EmailMetricsDay": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "date",
          "sent",
          "delivered",
          "delivery_delayed",
          "bounced",
          "complained",
          "opened",
          "clicked",
          "failed",
          "rates"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "sent": {
            "type": "integer"
          },
          "delivered": {
            "type": "integer"
          },
          "delivery_delayed": {
            "type": "integer"
          },
          "bounced": {
            "type": "integer"
          },
          "complained": {
            "type": "integer"
          },
          "opened": {
            "type": "integer"
          },
          "clicked": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "rates": {
            "$ref": "#/components/schemas/EmailMetricsRates"
          }
        }
      },
      "EmailMetricsResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "from",
          "to",
          "cohort",
          "totals",
          "days"
        ],
        "properties": {
          "object": {
            "const": "email_metrics"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "cohort": {
            "const": "email_created_at_utc"
          },
          "totals": {
            "$ref": "#/components/schemas/EmailMetricsCounters"
          },
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailMetricsDay"
            }
          }
        }
      },
      "ContactPropertyValue": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      },
      "ContactProperties": {
        "type": "object",
        "additionalProperties": {
          "$ref": "#/components/schemas/ContactPropertyValue"
        }
      },
      "ContactPropertiesPatch": {
        "type": "object",
        "additionalProperties": {
          "oneOf": [
            {
              "$ref": "#/components/schemas/ContactPropertyValue"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "ContactCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "unsubscribed": {
            "type": "boolean",
            "default": false
          },
          "properties": {
            "$ref": "#/components/schemas/ContactProperties"
          }
        }
      },
      "ContactUpdate": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 1,
        "properties": {
          "first_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "unsubscribed": {
            "type": "boolean"
          },
          "properties": {
            "$ref": "#/components/schemas/ContactPropertiesPatch"
          }
        }
      },
      "Contact": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "email",
          "first_name",
          "last_name",
          "unsubscribed",
          "properties",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "object": {
            "const": "contact"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "unsubscribed": {
            "type": "boolean"
          },
          "properties": {
            "$ref": "#/components/schemas/ContactProperties"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "previously_erased": {
            "type": "boolean"
          }
        }
      },
      "ContactListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "ContactDeleteResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "deleted",
          "consent_revoked"
        ],
        "properties": {
          "object": {
            "const": "contact"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "const": true
          },
          "consent_revoked": {
            "type": "boolean"
          }
        }
      },
      "SegmentCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "Segment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "name",
          "created_at"
        ],
        "properties": {
          "object": {
            "const": "segment"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SegmentListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Segment"
            }
          },
          "has_more": {
            "const": false
          }
        }
      },
      "SegmentDeleteResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "deleted"
        ],
        "properties": {
          "object": {
            "const": "segment"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "const": true
          }
        }
      },
      "TopicCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "default_subscription"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "default_subscription": {
            "enum": [
              "opt_in",
              "opt_out"
            ]
          },
          "visibility": {
            "enum": [
              "public",
              "private"
            ],
            "default": "private"
          }
        }
      },
      "TopicUpdate": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 1,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "visibility": {
            "enum": [
              "public",
              "private"
            ]
          }
        }
      },
      "Topic": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "name",
          "description",
          "default_subscription",
          "visibility",
          "created_at"
        ],
        "properties": {
          "object": {
            "const": "topic"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "default_subscription": {
            "enum": [
              "opt_in",
              "opt_out"
            ]
          },
          "visibility": {
            "enum": [
              "public",
              "private"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TopicListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Topic"
            }
          },
          "has_more": {
            "const": false
          }
        }
      },
      "TopicDeleteResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "deleted"
        ],
        "properties": {
          "object": {
            "const": "topic"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "const": true
          }
        }
      },
      "TemplateVariable": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "type"
        ],
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,49}$"
          },
          "type": {
            "enum": [
              "string",
              "number"
            ]
          },
          "fallback_value": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TemplateCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "alias": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
          },
          "subject": {
            "type": [
              "string",
              "null"
            ],
            "description": "At most 200 UTF-8 bytes, no CR/LF."
          },
          "html": {
            "type": [
              "string",
              "null"
            ],
            "description": "At most 48 KiB UTF-8; each line stays under 998 bytes."
          },
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "At most 48 KiB UTF-8; each line stays under 998 bytes."
          },
          "variables": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/TemplateVariable"
            }
          },
          "from": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "reply_to": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          }
        }
      },
      "TemplateUpdate": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 1,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "alias": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
          },
          "subject": {
            "type": [
              "string",
              "null"
            ],
            "description": "At most 200 UTF-8 bytes, no CR/LF."
          },
          "html": {
            "type": [
              "string",
              "null"
            ],
            "description": "At most 48 KiB UTF-8; each line stays under 998 bytes."
          },
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "At most 48 KiB UTF-8; each line stays under 998 bytes."
          },
          "variables": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/TemplateVariable"
            }
          },
          "from": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "reply_to": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          }
        }
      },
      "Template": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "name",
          "alias",
          "status",
          "subject",
          "html",
          "text",
          "variables",
          "from",
          "reply_to",
          "published_version",
          "has_unpublished_changes",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "object": {
            "const": "template"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "alias": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "draft",
              "published"
            ]
          },
          "subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "html": {
            "type": [
              "string",
              "null"
            ]
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateVariable"
            }
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "reply_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "published_version": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "has_unpublished_changes": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TemplateListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Template"
            }
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "TemplateVersion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "template_id",
          "version",
          "name",
          "subject",
          "html",
          "text",
          "variables",
          "from",
          "reply_to",
          "published_at"
        ],
        "properties": {
          "object": {
            "const": "template_version"
          },
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "html": {
            "type": [
              "string",
              "null"
            ]
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateVariable"
            }
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "reply_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TemplatePublishResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "template_id",
          "version",
          "name",
          "subject",
          "html",
          "text",
          "variables",
          "from",
          "reply_to",
          "published_at",
          "created"
        ],
        "properties": {
          "object": {
            "const": "template_version"
          },
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "html": {
            "type": [
              "string",
              "null"
            ]
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateVariable"
            }
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "reply_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "created": {
            "type": "boolean"
          }
        }
      },
      "TemplateDeleteResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "deleted"
        ],
        "properties": {
          "object": {
            "const": "template"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "const": true
          }
        }
      },
      "MailDomainBimi": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "logo_url"
        ],
        "properties": {
          "logo_url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://.*\\.svg$"
          },
          "authority_url": {
            "type": "string",
            "description": "HTTPS URL of a PEM VMC/CMC certificate, or an empty string."
          }
        }
      },
      "MailDomainRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "record",
          "name",
          "type",
          "value",
          "ttl",
          "required",
          "status"
        ],
        "properties": {
          "record": {
            "enum": [
              "DKIM",
              "MAIL_FROM",
              "SPF",
              "DMARC",
              "BIMI"
            ]
          },
          "name": {
            "type": "string"
          },
          "type": {
            "enum": [
              "CNAME",
              "MX",
              "TXT"
            ]
          },
          "value": {
            "type": "string"
          },
          "ttl": {
            "const": "Auto"
          },
          "required": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "pending",
              "verified",
              "not_checked"
            ]
          },
          "priority": {
            "type": "integer"
          },
          "requires_dmarc_enforcement": {
            "type": "boolean"
          }
        }
      },
      "MailDomain": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "name",
          "status",
          "region",
          "created_at",
          "open_tracking",
          "click_tracking",
          "tls",
          "custom_return_path",
          "mail_from_domain",
          "bimi"
        ],
        "properties": {
          "object": {
            "const": "domain"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "verified",
              "failed",
              "disabled"
            ]
          },
          "region": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "open_tracking": {
            "type": "boolean"
          },
          "click_tracking": {
            "type": "boolean"
          },
          "tls": {
            "enum": [
              "opportunistic",
              "enforced"
            ]
          },
          "custom_return_path": {
            "type": "string"
          },
          "mail_from_domain": {
            "type": "string"
          },
          "bimi": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MailDomainBimi"
              },
              {
                "type": "null"
              }
            ]
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailDomainRecord"
            }
          }
        }
      },
      "MailDomainCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 253
          },
          "region": {
            "type": "string"
          },
          "tls": {
            "enum": [
              "opportunistic",
              "enforced"
            ]
          },
          "custom_return_path": {
            "type": "string"
          },
          "open_tracking": {
            "type": "boolean"
          },
          "click_tracking": {
            "type": "boolean"
          },
          "bimi": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MailDomainBimi"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "MailDomainUpdate": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 1,
        "properties": {
          "tls": {
            "enum": [
              "opportunistic",
              "enforced"
            ]
          },
          "custom_return_path": {
            "type": "string"
          },
          "open_tracking": {
            "type": "boolean"
          },
          "click_tracking": {
            "type": "boolean"
          },
          "bimi": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MailDomainBimi"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "MailDomainListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "data"
        ],
        "properties": {
          "object": {
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailDomain"
            }
          }
        }
      },
      "MailDomainDeleteResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "name",
          "deleted"
        ],
        "properties": {
          "object": {
            "const": "domain"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "deleted": {
            "const": true
          }
        }
      },
      "DomainClaim": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "domain",
          "status",
          "record",
          "created_at",
          "expires_at",
          "checked_at",
          "concluded_at"
        ],
        "properties": {
          "object": {
            "const": "domain_claim"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "domain": {
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "transferred",
              "blocked",
              "expired",
              "cancelled"
            ]
          },
          "record": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "name",
              "value"
            ],
            "properties": {
              "type": {
                "const": "TXT"
              },
              "name": {
                "type": "string",
                "description": "_galon-claim.<domaine>"
              },
              "value": {
                "type": "string",
                "description": "galon-claim=<jeton>"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "concluded_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "domain_id": {
            "type": "string",
            "description": "The project's NEW domain (transferred)"
          },
          "reason": {
            "const": "domain_active_on_another_account"
          }
        }
      },
      "MailPlan": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label",
          "monthly_usd_cents",
          "annual_usd_cents",
          "annual_list_usd_cents",
          "overage_policy",
          "overage_proposal",
          "overage_usd_cents_per_1000",
          "daily_email_limit",
          "domain_limit",
          "webhook_limit",
          "retention_days",
          "segment_limit",
          "contact_limit",
          "inbox_limit",
          "monthly_send_limit",
          "subsidized",
          "monthly_minimum_sale_cents",
          "annual_saving_months"
        ],
        "oneOf": [
          {
            "required": [
              "included_emails"
            ]
          },
          {
            "required": [
              "included_contacts"
            ]
          }
        ],
        "properties": {
          "id": {
            "enum": [
              "free",
              "micro",
              "starter",
              "pro_50k",
              "pro_100k",
              "scale_250k",
              "scale_500k",
              "scale_1m",
              "scale_2_5m",
              "marketing_free",
              "marketing_5k",
              "marketing_10k",
              "marketing_25k",
              "marketing_50k",
              "marketing_100k",
              "marketing_150k"
            ]
          },
          "label": {
            "type": "string"
          },
          "included_emails": {
            "type": "integer",
            "minimum": 1
          },
          "included_contacts": {
            "type": "integer",
            "minimum": 1
          },
          "monthly_usd_cents": {
            "type": "integer",
            "minimum": 0
          },
          "annual_usd_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "Annual price TO PAY: 12 × monthly with a 15 % discount, rounded to the cent; 0 for Free."
          },
          "annual_list_usd_cents": {
            "type": "integer",
            "minimum": 0,
            "description": "Normal annual price, shown struck through: 12 × monthly; 0 for Free."
          },
          "overage_policy": {
            "enum": [
              "blocked",
              "billed"
            ]
          },
          "overage_proposal": {
            "enum": [
              "blocked",
              "billed"
            ]
          },
          "overage_usd_cents_per_1000": {
            "type": "integer",
            "minimum": 0
          },
          "daily_email_limit": {
            "type": "integer",
            "minimum": 0
          },
          "domain_limit": {
            "type": "integer",
            "minimum": 1
          },
          "webhook_limit": {
            "type": "integer",
            "minimum": 1
          },
          "retention_days": {
            "type": "integer",
            "minimum": 1
          },
          "archive_max_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 365,
            "description": "Longest archiving period allowed by the plan (0: no archiving)."
          },
          "segment_limit": {
            "type": "integer",
            "minimum": 0
          },
          "contact_limit": {
            "type": "integer",
            "minimum": 0
          },
          "inbox_limit": {
            "type": "integer",
            "minimum": 1
          },
          "monthly_send_limit": {
            "type": "integer",
            "minimum": 0
          },
          "subsidized": {
            "type": "boolean"
          },
          "monthly_minimum_sale_cents": {
            "type": "integer",
            "minimum": 0
          },
          "annual_saving_months": {
            "const": 0
          }
        }
      },
      "MailPricingProduct": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label",
          "meter",
          "usage_meter",
          "plans"
        ],
        "properties": {
          "id": {
            "enum": [
              "transactional",
              "marketing"
            ]
          },
          "label": {
            "enum": [
              "Transactional",
              "Marketing"
            ]
          },
          "meter": {
            "enum": [
              "emails_per_month",
              "active_contacts"
            ]
          },
          "usage_meter": {
            "enum": [
              "",
              "marketing_emails_per_month"
            ]
          },
          "plans": {
            "type": "array",
            "minItems": 7,
            "maxItems": 9,
            "description": "Transactional: 9 plans (Free, Micro and Starter below Pro 50k); Marketing: 7.",
            "items": {
              "$ref": "#/components/schemas/MailPlan"
            }
          }
        }
      },
      "MailPricing": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "version",
          "currency",
          "price_status",
          "markup_bps",
          "products",
          "plans",
          "promotions",
          "add_ons",
          "fingerprint"
        ],
        "properties": {
          "schema": {
            "const": "galon.mail.pricing.v1"
          },
          "version": {
            "type": "string"
          },
          "currency": {
            "const": "USD"
          },
          "price_status": {
            "enum": [
              "proposal",
              "validated"
            ]
          },
          "markup_bps": {
            "const": 10000
          },
          "products": {
            "type": "array",
            "minItems": 1,
            "maxItems": 2,
            "description": "Transactional always; Marketing only if it is open (closed at launch).",
            "items": {
              "$ref": "#/components/schemas/MailPricingProduct"
            }
          },
          "plans": {
            "type": "array",
            "minItems": 8,
            "maxItems": 9,
            "description": "Transactional projection retained during client migration (8 plans; 9 while the retired Micro plan is served to existing subscribers).",
            "items": {
              "$ref": "#/components/schemas/MailPlan"
            }
          },
          "promotions": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "add_ons": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "dedicated_ip",
              "sso"
            ],
            "properties": {
              "dedicated_ip": {
                "const": "request_only"
              },
              "sso": {
                "const": "request_only"
              }
            }
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      },
      "MailOnboardingAnswer": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "message"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "Ephemeral response; it is never stored in the database."
          }
        }
      },
      "PaymentMethods": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "country",
          "methods"
        ],
        "properties": {
          "country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "methods": {
            "type": "array",
            "maxItems": 2,
            "uniqueItems": true,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id"
              ],
              "properties": {
                "id": {
                  "enum": [
                    "card",
                    "mobile_money"
                  ]
                }
              }
            }
          }
        }
      },
      "UsageSpend": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "month",
          "currency",
          "basis",
          "projects",
          "spend_usd_cents",
          "excluded_lines"
        ],
        "properties": {
          "month": {
            "type": "string",
            "pattern": "^[0-9]{4}-[0-9]{2}$"
          },
          "currency": {
            "const": "USD"
          },
          "basis": {
            "const": "active_subscriptions_monthly"
          },
          "projects": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "project_id",
                "services",
                "spend_usd_cents"
              ],
              "properties": {
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "services": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "service",
                      "spend_usd_cents"
                    ],
                    "properties": {
                      "service": {
                        "enum": [
                          "mail",
                          "domain",
                          "storage",
                          "functions",
                          "compute",
                          "backend",
                          "geo",
                          "search"
                        ]
                      },
                      "spend_usd_cents": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  }
                },
                "spend_usd_cents": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "spend_usd_cents": {
            "type": "integer",
            "minimum": 0
          },
          "excluded_lines": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "MailCancellation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "checkout_id",
          "project_id",
          "product",
          "status",
          "display",
          "cancel_at_period_end",
          "renews_at",
          "ends_at",
          "paid_until"
        ],
        "properties": {
          "checkout_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "product": {
            "enum": [
              "transactional",
              "marketing"
            ]
          },
          "status": {
            "const": "cancel_scheduled"
          },
          "display": {
            "enum": [
              "ok",
              "att",
              "err",
              "prog",
              "brouillon",
              "neutre"
            ]
          },
          "cancel_at_period_end": {
            "const": true
          },
          "renews_at": {
            "type": "null"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "paid_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      },
      "BillingSubscription": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "project_id",
          "project_name",
          "product",
          "plan_id",
          "plan_label",
          "period",
          "renews_at",
          "amount_usd_cents",
          "status",
          "display",
          "cancel_at_period_end",
          "ends_at"
        ],
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_name": {
            "type": "string"
          },
          "product": {
            "enum": [
              "transactional",
              "marketing"
            ]
          },
          "plan_id": {
            "type": "string"
          },
          "plan_label": {
            "type": "string"
          },
          "period": {
            "enum": [
              "monthly",
              "annual"
            ]
          },
          "renews_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "amount_usd_cents": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "enum": [
              "active",
              "cancel_scheduled",
              "past_due"
            ]
          },
          "display": {
            "enum": [
              "ok",
              "att",
              "err",
              "prog",
              "brouillon",
              "neutre"
            ]
          },
          "cancel_at_period_end": {
            "type": "boolean"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "BillingDetails": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "legal_name",
          "emails",
          "address",
          "tax_id"
        ],
        "properties": {
          "legal_name": {
            "type": "string",
            "maxLength": 200
          },
          "emails": {
            "type": "array",
            "maxItems": 5,
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "address": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "line1",
              "line2",
              "city",
              "postal_code",
              "country"
            ],
            "properties": {
              "line1": {
                "type": "string",
                "maxLength": 200
              },
              "line2": {
                "type": "string",
                "maxLength": 200
              },
              "city": {
                "type": "string",
                "maxLength": 120
              },
              "postal_code": {
                "type": "string",
                "maxLength": 20
              },
              "country": {
                "type": "string",
                "pattern": "^([A-Za-z]{2})?$"
              }
            }
          },
          "tax_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9 ./-]{0,64}$"
          }
        }
      },
      "Invoice": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "number",
          "issued_at",
          "description",
          "amount_usd_cents",
          "status",
          "display"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^inv_[0-9a-f]{32}$"
          },
          "number": {
            "type": "string",
            "pattern": "^GLN-[0-9]{6,}$"
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "amount_usd_cents": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "enum": [
              "paid",
              "refunded"
            ]
          },
          "display": {
            "enum": [
              "ok",
              "att",
              "err",
              "prog",
              "brouillon",
              "neutre"
            ]
          }
        }
      },
      "Budget": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "monthly_usd_cents"
        ],
        "properties": {
          "monthly_usd_cents": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 100,
            "maximum": 100000000
          },
          "thresholds": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "enum": [
                50,
                80,
                100
              ]
            }
          }
        }
      },
      "PaymentMethodCard": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "brand",
          "last4",
          "exp_month",
          "exp_year"
        ],
        "properties": {
          "kind": {
            "const": "card"
          },
          "brand": {
            "type": "string"
          },
          "last4": {
            "type": "string",
            "pattern": "^[0-9]{4}$"
          },
          "exp_month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "exp_year": {
            "type": "integer",
            "minimum": 2000
          }
        }
      },
      "Pricing": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "currency",
          "services"
        ],
        "properties": {
          "currency": {
            "const": "USD"
          },
          "services": {
            "type": "array",
            "minItems": 8,
            "maxItems": 8,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "status"
              ],
              "properties": {
                "id": {
                  "enum": [
                    "mail",
                    "storage",
                    "domain",
                    "functions",
                    "compute",
                    "backend",
                    "geo",
                    "search"
                  ]
                },
                "status": {
                  "enum": [
                    "open",
                    "soon"
                  ]
                },
                "products": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "id",
                      "plans"
                    ],
                    "properties": {
                      "id": {
                        "enum": [
                          "transactional",
                          "marketing"
                        ]
                      },
                      "plans": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "label",
                            "monthly_usd_cents",
                            "annual_usd_cents",
                            "annual_list_usd_cents",
                            "limits"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "monthly_usd_cents": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "annual_usd_cents": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "annual_list_usd_cents": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "limits": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "SalesContact": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "email"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "company": {
            "type": "string",
            "maxLength": 160
          },
          "product": {
            "enum": [
              "mail",
              "storage",
              "domain",
              "functions",
              "compute",
              "backend",
              "geo",
              "search",
              "transactional",
              "marketing",
              "other"
            ]
          },
          "monthly_volume": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "message": {
            "type": "string",
            "maxLength": 4000
          }
        }
      },
      "JobType": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "label_code"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "label_code": {
            "type": "string",
            "pattern": "^job_type_[a-z0-9_]+$"
          }
        }
      },
      "BounceReason": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "reason",
          "count",
          "share"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "share": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        }
      },
      "MailDeliverability": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "project_id",
          "generated_at",
          "classification_version",
          "cohort",
          "minimum_volume",
          "windows",
          "recommendations"
        ],
        "properties": {
          "object": {
            "const": "mail_deliverability"
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "classification_version": {
            "type": "string"
          },
          "cohort": {
            "const": "email_sent_at_utc"
          },
          "minimum_volume": {
            "type": "integer",
            "minimum": 1
          },
          "windows": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {
              "$ref": "#/components/schemas/MailDeliverabilityWindow"
            }
          },
          "recommendations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailDeliverabilityRecommendation"
            }
          },
          "thresholds": {
            "type": "array",
            "description": "Global thresholds (scope all) of the traced rates, derived from the deliverability rules.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "code",
                "metric",
                "comparison",
                "threshold",
                "severity"
              ],
              "properties": {
                "code": {
                  "enum": [
                    "gmail_complaint_rate_over_google_limit",
                    "gmail_complaint_rate_over_google_target",
                    "yahoo_complaint_rate_over_limit",
                    "complaint_rate_high",
                    "complaint_rate_overall_critical",
                    "complaint_rate_overall_high",
                    "hard_bounce_rate_critical",
                    "hard_bounce_rate_high",
                    "soft_bounce_rate_high",
                    "reject_rate_high",
                    "delivery_rate_low",
                    "delivery_median_delay_high",
                    "unattributed_share_high",
                    "volume_too_low_to_judge"
                  ]
                },
                "metric": {
                  "enum": [
                    "hard_bounce_rate",
                    "complaint_rate"
                  ]
                },
                "comparison": {
                  "enum": [
                    ">=",
                    ">",
                    "<"
                  ]
                },
                "threshold": {
                  "type": "number"
                },
                "severity": {
                  "enum": [
                    "critical",
                    "warning"
                  ]
                }
              }
            }
          }
        }
      },
      "MailDeliverabilityWindow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "window",
          "from",
          "to",
          "providers",
          "total"
        ],
        "properties": {
          "window": {
            "enum": [
              "7d",
              "30d"
            ]
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailDeliverabilityProvider"
            }
          },
          "total": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "sent",
              "delivered",
              "hard_bounces",
              "soft_bounces",
              "undetermined_bounces",
              "complaints",
              "rejects",
              "delayed",
              "median_delivery_seconds",
              "rates",
              "judged",
              "status",
              "unattributed_share"
            ],
            "properties": {
              "sent": {
                "type": "integer",
                "minimum": 0
              },
              "delivered": {
                "type": "integer",
                "minimum": 0
              },
              "hard_bounces": {
                "type": "integer",
                "minimum": 0
              },
              "soft_bounces": {
                "type": "integer",
                "minimum": 0
              },
              "undetermined_bounces": {
                "type": "integer",
                "minimum": 0
              },
              "complaints": {
                "type": "integer",
                "minimum": 0
              },
              "rejects": {
                "type": "integer",
                "minimum": 0
              },
              "delayed": {
                "type": "integer",
                "minimum": 0
              },
              "median_delivery_seconds": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              },
              "rates": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "delivery_rate",
                  "hard_bounce_rate",
                  "soft_bounce_rate",
                  "complaint_rate",
                  "reject_rate"
                ],
                "properties": {
                  "delivery_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1
                  },
                  "hard_bounce_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1
                  },
                  "soft_bounce_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1
                  },
                  "complaint_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1
                  },
                  "reject_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1
                  }
                }
              },
              "judged": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "ok",
                  "warning",
                  "critical",
                  "insufficient_volume"
                ]
              },
              "unattributed_share": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              }
            }
          }
        }
      },
      "MailDeliverabilityProvider": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "provider",
          "label",
          "sent",
          "delivered",
          "hard_bounces",
          "soft_bounces",
          "undetermined_bounces",
          "complaints",
          "rejects",
          "delayed",
          "median_delivery_seconds",
          "rates",
          "judged",
          "status"
        ],
        "properties": {
          "provider": {
            "enum": [
              "gmail",
              "microsoft",
              "yahoo_aol",
              "apple",
              "orange",
              "other",
              "unattributed"
            ]
          },
          "label": {
            "type": "string"
          },
          "sent": {
            "type": "integer",
            "minimum": 0
          },
          "delivered": {
            "type": "integer",
            "minimum": 0
          },
          "hard_bounces": {
            "type": "integer",
            "minimum": 0
          },
          "soft_bounces": {
            "type": "integer",
            "minimum": 0
          },
          "undetermined_bounces": {
            "type": "integer",
            "minimum": 0
          },
          "complaints": {
            "type": "integer",
            "minimum": 0
          },
          "rejects": {
            "type": "integer",
            "minimum": 0
          },
          "delayed": {
            "type": "integer",
            "minimum": 0
          },
          "median_delivery_seconds": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "rates": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "delivery_rate",
              "hard_bounce_rate",
              "soft_bounce_rate",
              "complaint_rate",
              "reject_rate"
            ],
            "properties": {
              "delivery_rate": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              },
              "hard_bounce_rate": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              },
              "soft_bounce_rate": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              },
              "complaint_rate": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              },
              "reject_rate": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "judged": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "ok",
              "warning",
              "critical",
              "insufficient_volume"
            ]
          }
        }
      },
      "MailDeliverabilityRecommendation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "severity",
          "provider",
          "metric",
          "comparison",
          "threshold",
          "windows",
          "message"
        ],
        "properties": {
          "code": {
            "enum": [
              "gmail_complaint_rate_over_google_limit",
              "gmail_complaint_rate_over_google_target",
              "yahoo_complaint_rate_over_limit",
              "complaint_rate_high",
              "complaint_rate_overall_critical",
              "complaint_rate_overall_high",
              "hard_bounce_rate_critical",
              "hard_bounce_rate_high",
              "soft_bounce_rate_high",
              "reject_rate_high",
              "delivery_rate_low",
              "delivery_median_delay_high",
              "unattributed_share_high",
              "volume_too_low_to_judge"
            ]
          },
          "severity": {
            "enum": [
              "critical",
              "warning",
              "info"
            ]
          },
          "provider": {
            "enum": [
              "all",
              "gmail",
              "microsoft",
              "yahoo_aol",
              "apple",
              "orange",
              "other",
              "unattributed"
            ]
          },
          "metric": {
            "enum": [
              "complaint_rate",
              "delivery_rate",
              "hard_bounce_rate",
              "median_delivery_seconds",
              "reject_rate",
              "sent",
              "soft_bounce_rate",
              "unattributed_share"
            ]
          },
          "comparison": {
            "enum": [
              ">=",
              ">",
              "<"
            ]
          },
          "threshold": {
            "type": "number"
          },
          "windows": {
            "type": "object",
            "additionalProperties": false,
            "minProperties": 1,
            "properties": {
              "7d": {
                "type": "number"
              },
              "30d": {
                "type": "number"
              }
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "MailCheckout": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "billing_country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "payment_method": {
            "enum": [
              "card",
              "mobile_money",
              "carte"
            ],
            "description": "An identifier from `GET /billing/payment-methods` for this country; if absent: card. `carte` is still accepted as a legacy alias of `card`."
          },
          "phone": {
            "type": "string",
            "maxLength": 32,
            "description": "The client's phone number, in international format ('+225 07 00 00 00 00', reduced to E.164), required when the card is charged through a subscription with a payment provider that requests it; if absent in that case: 422 `mail_checkout_phone_required`."
          }
        }
      },
      "MailSubscription": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "checkout_id",
          "project_id",
          "onboarding_version",
          "product",
          "plan_id",
          "billing_period",
          "promotion_code",
          "included_messages",
          "included_contacts",
          "included_marketing_sends",
          "catalog_amount_cents",
          "payable_amount_cents",
          "currency",
          "quote_fingerprint",
          "quoted_on",
          "status",
          "checkout_url",
          "created_at",
          "updated_at",
          "renews_at",
          "cancel_at_period_end",
          "ends_at"
        ],
        "properties": {
          "renews_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Next renewal (card saved, no cancellation); null otherwise."
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "description": "Scheduled cancellation: the plan remains active until ends_at, then the project reverts to Free."
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "End of the plan (cancelled, or prepaid period without renewal); null otherwise."
          },
          "charged_currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "description": "Present only when the actual charge differs from the price shown in USD: the ISO 4217 code of the charged currency."
          },
          "charged_amount_cents": {
            "type": "integer",
            "minimum": 1,
            "description": "The amount charged, in hundredths of the charged currency."
          },
          "charged_currency_label": {
            "type": "string",
            "description": "The label of the charged currency, for the consent sentence shown before payment."
          },
          "schema": {
            "const": "galon.mail.subscription.v1"
          },
          "checkout_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "onboarding_version": {
            "type": "integer",
            "minimum": 1
          },
          "product": {
            "enum": [
              "transactional",
              "marketing"
            ]
          },
          "plan_id": {
            "enum": [
              "micro",
              "starter",
              "pro_50k",
              "pro_100k",
              "scale_250k",
              "scale_500k",
              "scale_1m",
              "scale_2_5m",
              "marketing_5k",
              "marketing_10k",
              "marketing_25k",
              "marketing_50k",
              "marketing_100k",
              "marketing_150k"
            ]
          },
          "billing_period": {
            "enum": [
              "monthly",
              "annual"
            ]
          },
          "promotion_code": {
            "const": ""
          },
          "included_messages": {
            "type": "integer",
            "minimum": 0
          },
          "included_contacts": {
            "type": "integer",
            "minimum": 0
          },
          "included_marketing_sends": {
            "type": "integer",
            "minimum": 0
          },
          "catalog_amount_cents": {
            "type": "integer",
            "minimum": 1
          },
          "payable_amount_cents": {
            "type": "integer",
            "minimum": 1
          },
          "currency": {
            "const": "USD"
          },
          "quote_fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "quoted_on": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "enum": [
              "creating",
              "pending",
              "paid",
              "past_due",
              "canceled",
              "refused",
              "reconcile",
              "refunded"
            ]
          },
          "checkout_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MailFreeEntitlement": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "project_id",
          "onboarding_version",
          "plan_id",
          "billing_period",
          "promotion_code",
          "included_messages",
          "daily_messages",
          "catalog_amount_cents",
          "payable_amount_cents",
          "currency",
          "status",
          "checkout_url",
          "created_at",
          "updated_at",
          "renews_at",
          "cancel_at_period_end",
          "ends_at"
        ],
        "oneOf": [
          {
            "properties": {
              "schema": {
                "const": "galon.mail.free-entitlement.v1"
              },
              "plan_id": {
                "const": "free"
              }
            },
            "required": [
              "policy_version",
              "policy_fingerprint",
              "last_activity_at"
            ]
          },
          {
            "properties": {
              "schema": {
                "const": "galon.mail.free-entitlement.v2"
              }
            },
            "required": [
              "product",
              "included_contacts",
              "included_marketing_sends"
            ]
          }
        ],
        "properties": {
          "renews_at": {
            "type": "null"
          },
          "cancel_at_period_end": {
            "const": false
          },
          "ends_at": {
            "type": "null"
          },
          "schema": {
            "enum": [
              "galon.mail.free-entitlement.v1",
              "galon.mail.free-entitlement.v2"
            ]
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "onboarding_version": {
            "type": "integer",
            "minimum": 1
          },
          "product": {
            "enum": [
              "transactional",
              "marketing"
            ]
          },
          "plan_id": {
            "enum": [
              "free",
              "marketing_free"
            ]
          },
          "billing_period": {
            "const": "monthly"
          },
          "promotion_code": {
            "const": ""
          },
          "included_messages": {
            "type": "integer",
            "minimum": 0
          },
          "included_contacts": {
            "type": "integer",
            "minimum": 0
          },
          "included_marketing_sends": {
            "type": "integer",
            "minimum": 0
          },
          "daily_messages": {
            "type": "integer",
            "minimum": 0
          },
          "catalog_amount_cents": {
            "const": 0
          },
          "payable_amount_cents": {
            "const": 0
          },
          "currency": {
            "const": "USD"
          },
          "policy_version": {
            "type": "string"
          },
          "policy_fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "status": {
            "enum": [
              "active",
              "suspended",
              "canceled"
            ]
          },
          "checkout_url": {
            "type": "null"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_activity_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FreeTierLimit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "service",
          "metric",
          "unit",
          "period",
          "limit",
          "availability"
        ],
        "properties": {
          "service": {
            "type": "string"
          },
          "metric": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 0
          },
          "availability": {
            "enum": [
              "available",
              "preview"
            ]
          }
        }
      },
      "FreeTier": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "version",
          "id",
          "label",
          "monthly_usd_cents",
          "limits",
          "restrictions",
          "upgrade_policy",
          "fingerprint"
        ],
        "properties": {
          "schema": {
            "const": "galon.cloud.free-tier.v1"
          },
          "version": {
            "type": "string"
          },
          "id": {
            "const": "free"
          },
          "label": {
            "type": "string"
          },
          "monthly_usd_cents": {
            "const": 0
          },
          "limits": {
            "type": "array",
            "minItems": 10,
            "items": {
              "$ref": "#/components/schemas/FreeTierLimit"
            }
          },
          "restrictions": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "upgrade_policy": {
            "const": "hard_limit_then_upgrade"
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      },
      "DomainLookup": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "domain"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "minLength": 3,
            "maxLength": 253,
            "examples": [
              "exemple.ci"
            ]
          }
        }
      },
      "DomainPortfolioItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domain",
          "provider",
          "status",
          "auto_renew",
          "locked",
          "private_whois",
          "dnssec",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "provider": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated (N-1), removal proposed on 2027-02-03: do not read; Galon does not name its registrar."
          },
          "status": {
            "type": "string"
          },
          "expiration_at": {
            "type": "string"
          },
          "renewal_at": {
            "type": "string"
          },
          "auto_renew": {
            "type": "boolean"
          },
          "locked": {
            "type": "boolean"
          },
          "private_whois": {
            "type": "boolean"
          },
          "dnssec": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DomainQuote": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domain",
          "operation",
          "period",
          "provider",
          "sale_price",
          "premium",
          "status",
          "created_at",
          "expires_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^dqt_[0-9a-f]{64}$"
          },
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "operation": {
            "enum": [
              "create",
              "transfer",
              "renew",
              "restore"
            ]
          },
          "period": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "provider": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated (N-1), removal proposed on 2027-02-03: do not read; Galon does not name its registrar."
          },
          "sale_price": {
            "$ref": "#/components/schemas/Money"
          },
          "premium": {
            "const": false
          },
          "status": {
            "enum": [
              "active",
              "consumed"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DomainOrder": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "job_id",
          "quote_id",
          "domain_id",
          "domain",
          "operation",
          "amount_minor",
          "currency",
          "status",
          "refund_reason",
          "paid_at",
          "fulfilled_at",
          "refund_requested_at",
          "refunded_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^dor_[0-9a-f]{64}$"
          },
          "job_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "quote_id": {
            "type": "string",
            "pattern": "^dqt_[0-9a-f]{64}$"
          },
          "domain_id": {
            "type": "string"
          },
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "operation": {
            "enum": [
              "create",
              "transfer",
              "renew",
              "restore"
            ]
          },
          "amount_minor": {
            "type": "integer",
            "minimum": 1
          },
          "currency": {
            "const": "USD"
          },
          "status": {
            "enum": [
              "paid",
              "fulfilled",
              "failed",
              "refund_requested",
              "refunded",
              "refund_refused"
            ]
          },
          "refund_reason": {
            "type": "string"
          },
          "paid_at": {
            "type": "string",
            "format": "date-time"
          },
          "fulfilled_at": {
            "type": "string"
          },
          "refund_requested_at": {
            "type": "string"
          },
          "refunded_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DomainNotice": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domain_id",
          "type",
          "threshold_days",
          "expiration_at",
          "status",
          "created_at",
          "read_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "domain_id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "enum": [
              "expiration_warning",
              "renewal_preparation",
              "expired",
              "redemption"
            ]
          },
          "threshold_days": {
            "enum": [
              0,
              1,
              7,
              30,
              90
            ]
          },
          "expiration_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "enum": [
              "unread",
              "read",
              "dismissed"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "read_at": {
            "type": "string"
          }
        }
      },
      "DomainNoticeUpdate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "enum": [
              "read",
              "dismissed"
            ]
          }
        }
      },
      "DomainRefundRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "enum": [
              "provider_failed",
              "duplicate_charge",
              "domain_unavailable",
              "other_review"
            ]
          }
        }
      },
      "DomainCheckout": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "registrant"
        ],
        "description": "Order for a domain. `quote_id` (the sales quote the client saw) sets the order's amount and currency, identically; a quote that is expired, consumed, from another project or for another name is refused before any effect. `lookup_job_id` attached to the quote proves only the availability of the same name; on its own, it is the legacy call (N-1), deprecated.",
        "properties": {
          "quote_id": {
            "type": "string",
            "pattern": "^dqt_[0-9a-f]{64}$",
            "description": "The sales quote seen by the client (`domain.quote`): the sole authority for the price charged."
          },
          "lookup_job_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "The `domain.lookup` job for the same name (availability). On its own, without `quote_id`: N-1, deprecated."
          },
          "registrant": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "first_name",
              "last_name",
              "email",
              "phone",
              "address"
            ],
            "properties": {
              "first_name": {
                "type": "string",
                "maxLength": 100
              },
              "last_name": {
                "type": "string",
                "maxLength": 100
              },
              "company_name": {
                "type": "string",
                "maxLength": 200
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 320
              },
              "locale": {
                "type": "string",
                "maxLength": 12
              },
              "phone": {
                "type": "object"
              },
              "address": {
                "type": "object"
              }
            }
          },
          "registry_data": {
            "type": "object",
            "description": "Additional data required by the registry"
          }
        }
      },
      "Money": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "amount_minor",
          "currency"
        ],
        "properties": {
          "amount_minor": {
            "type": "integer",
            "minimum": 0
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        }
      },
      "DomainRegistryData": {
        "type": "object",
        "additionalProperties": false,
        "description": "Registry data currently supported for a transfer. A different requirement remains closed until its dedicated schema.",
        "properties": {
          "intended_use": {
            "type": "string",
            "minLength": 1,
            "maxLength": 125,
            "pattern": "^(?=[\\s\\S]*\\S)[^\\u0000-\\u001F\\u007F]+(?![\\s\\S])",
            "description": "Usage requested by the registry. The public bound of 125 characters guarantees at most 500 UTF-8 bytes; ECMA-262 whitespace alone, C0 controls and DEL are refused."
          }
        }
      },
      "DomainTransferClientSteps": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "domain_unlocked",
          "owner_consent_confirmed",
          "email_access_confirmed",
          "terms_accepted"
        ],
        "properties": {
          "domain_unlocked": {
            "const": true
          },
          "owner_consent_confirmed": {
            "const": true
          },
          "email_access_confirmed": {
            "const": true
          },
          "terms_accepted": {
            "const": true
          }
        }
      },
      "DomainTransferQuoteInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "domain",
          "quote_id",
          "registrant",
          "client_steps"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "quote_id": {
            "type": "string",
            "pattern": "^dqt_[0-9a-f]{64}$"
          },
          "registrant": {
            "type": "object"
          },
          "client_steps": {
            "$ref": "#/components/schemas/DomainTransferClientSteps"
          },
          "registry_data": {
            "$ref": "#/components/schemas/DomainRegistryData"
          },
          "auto_renew": {
            "type": "boolean"
          },
          "import_nameservers": {
            "type": "boolean"
          }
        }
      },
      "DomainTransferLegacyInput": {
        "type": "object",
        "deprecated": true,
        "additionalProperties": false,
        "required": [
          "domain",
          "provider_price",
          "registrant",
          "client_steps"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "provider_price": {
            "$ref": "#/components/schemas/Money",
            "deprecated": true
          },
          "registrant": {
            "type": "object"
          },
          "client_steps": {
            "$ref": "#/components/schemas/DomainTransferClientSteps"
          },
          "registry_data": {
            "$ref": "#/components/schemas/DomainRegistryData"
          },
          "auto_renew": {
            "type": "boolean"
          },
          "import_nameservers": {
            "type": "boolean"
          }
        }
      },
      "DomainRenewQuoteInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "domain",
          "quote_id"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "quote_id": {
            "type": "string",
            "pattern": "^dqt_[0-9a-f]{64}$"
          },
          "period": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          }
        }
      },
      "DomainRenewLegacyInput": {
        "type": "object",
        "deprecated": true,
        "additionalProperties": false,
        "required": [
          "domain",
          "provider_price"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "provider_price": {
            "$ref": "#/components/schemas/Money",
            "deprecated": true
          },
          "period": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          }
        }
      },
      "DomainRestoreQuoteInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "domain",
          "quote_id"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "quote_id": {
            "type": "string",
            "pattern": "^dqt_[0-9a-f]{64}$"
          }
        }
      },
      "DomainRestoreLegacyInput": {
        "type": "object",
        "deprecated": true,
        "additionalProperties": false,
        "required": [
          "domain",
          "provider_price"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 253
          },
          "provider_price": {
            "$ref": "#/components/schemas/Money",
            "deprecated": true
          }
        }
      },
      "DomainAction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DomainTransferAction"
          },
          {
            "$ref": "#/components/schemas/DomainRenewAction"
          },
          {
            "$ref": "#/components/schemas/DomainRestoreAction"
          },
          {
            "$ref": "#/components/schemas/DomainUpdateAction"
          },
          {
            "$ref": "#/components/schemas/DomainDnsAction"
          },
          {
            "$ref": "#/components/schemas/DomainConnectAction"
          }
        ]
      },
      "DomainTransferAction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DomainTransferQuoteAction"
          },
          {
            "$ref": "#/components/schemas/DomainTransferLegacyAction"
          }
        ]
      },
      "DomainTransferQuoteAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "input",
          "epp_code"
        ],
        "properties": {
          "type": {
            "const": "domain.transfer"
          },
          "epp_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "writeOnly": true
          },
          "input": {
            "$ref": "#/components/schemas/DomainTransferQuoteInput"
          }
        }
      },
      "DomainTransferLegacyAction": {
        "type": "object",
        "deprecated": true,
        "additionalProperties": false,
        "required": [
          "type",
          "input",
          "epp_code"
        ],
        "properties": {
          "type": {
            "const": "domain.transfer"
          },
          "epp_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "writeOnly": true
          },
          "input": {
            "$ref": "#/components/schemas/DomainTransferLegacyInput"
          }
        }
      },
      "DomainRenewAction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DomainRenewQuoteAction"
          },
          {
            "$ref": "#/components/schemas/DomainRenewLegacyAction"
          }
        ]
      },
      "DomainRenewQuoteAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "input"
        ],
        "properties": {
          "type": {
            "const": "domain.renew"
          },
          "input": {
            "$ref": "#/components/schemas/DomainRenewQuoteInput"
          }
        }
      },
      "DomainRenewLegacyAction": {
        "type": "object",
        "deprecated": true,
        "additionalProperties": false,
        "required": [
          "type",
          "input"
        ],
        "properties": {
          "type": {
            "const": "domain.renew"
          },
          "input": {
            "$ref": "#/components/schemas/DomainRenewLegacyInput"
          }
        }
      },
      "DomainRestoreAction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DomainRestoreQuoteAction"
          },
          {
            "$ref": "#/components/schemas/DomainRestoreLegacyAction"
          }
        ]
      },
      "DomainRestoreQuoteAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "input"
        ],
        "properties": {
          "type": {
            "const": "domain.restore"
          },
          "input": {
            "$ref": "#/components/schemas/DomainRestoreQuoteInput"
          }
        }
      },
      "DomainRestoreLegacyAction": {
        "type": "object",
        "deprecated": true,
        "additionalProperties": false,
        "required": [
          "type",
          "input"
        ],
        "properties": {
          "type": {
            "const": "domain.restore"
          },
          "input": {
            "$ref": "#/components/schemas/DomainRestoreLegacyInput"
          }
        }
      },
      "DomainUpdateAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "input"
        ],
        "properties": {
          "type": {
            "const": "domain.update"
          },
          "input": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "domain",
              "changes"
            ],
            "properties": {
              "domain": {
                "type": "string",
                "maxLength": 253
              },
              "changes": {
                "type": "object",
                "minProperties": 1,
                "additionalProperties": false,
                "properties": {
                  "auto_renew": {
                    "type": "boolean"
                  },
                  "locked": {
                    "type": "boolean"
                  },
                  "private_whois": {
                    "type": "boolean"
                  },
                  "dnssec": {
                    "type": "boolean"
                  },
                  "nameservers": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 13,
                    "items": {
                      "type": "string"
                    }
                  },
                  "registrant": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      },
      "DomainDnsAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "input"
        ],
        "properties": {
          "type": {
            "const": "domain.dns.apply"
          },
          "input": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "domain",
              "mode",
              "records"
            ],
            "properties": {
              "domain": {
                "type": "string",
                "maxLength": 253
              },
              "mode": {
                "enum": [
                  "add",
                  "remove",
                  "replace"
                ]
              },
              "records": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "name",
                    "type",
                    "value"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "A",
                        "AAAA",
                        "CAA",
                        "CNAME",
                        "HTTPS",
                        "MX",
                        "NS",
                        "SRV",
                        "SSHFP",
                        "SVCB",
                        "TLSA",
                        "TXT"
                      ]
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "ttl": {
                      "type": "integer",
                      "minimum": 60,
                      "maximum": 86400
                    },
                    "priority": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 65535
                    }
                  }
                }
              }
            }
          }
        }
      },
      "DomainConnectAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "input"
        ],
        "properties": {
          "type": {
            "const": "domain.connect"
          },
          "input": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "domain",
              "deployment_id"
            ],
            "properties": {
              "domain": {
                "type": "string",
                "maxLength": 253
              },
              "deployment_id": {
                "type": "string",
                "maxLength": 200
              }
            }
          }
        }
      },
      "WebhookCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url",
          "events"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "events": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "enum": [
                "job.queued",
                "job.started",
                "job.succeeded",
                "job.failed",
                "job.cancelled",
                "job.uncertain",
                "artifact.ready",
                "email.sent",
                "email.delivered",
                "email.delivery_delayed",
                "email.bounced",
                "email.complained",
                "email.failed",
                "email.suppressed",
                "email.scheduled",
                "email.opened",
                "email.clicked",
                "email.received",
                "broadcast.sent",
                "broadcast.completed",
                "deploy.created",
                "deploy.succeeded",
                "deploy.failed",
                "deploy.promoted",
                "deploy.rolled_back"
              ]
            }
          }
        }
      },
      "WebhookUpdate": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 1,
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "events": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "enum": [
                "job.queued",
                "job.started",
                "job.succeeded",
                "job.failed",
                "job.cancelled",
                "job.uncertain",
                "artifact.ready",
                "email.sent",
                "email.delivered",
                "email.delivery_delayed",
                "email.bounced",
                "email.complained",
                "email.failed",
                "email.suppressed",
                "email.scheduled",
                "email.opened",
                "email.clicked",
                "email.received",
                "broadcast.sent",
                "broadcast.completed",
                "deploy.created",
                "deploy.succeeded",
                "deploy.failed",
                "deploy.promoted",
                "deploy.rolled_back"
              ]
            }
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "tenant_id",
          "projet_id",
          "url",
          "events",
          "secret_prefix",
          "active",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "tenant_id": {
            "type": "string"
          },
          "projet_id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "secret_prefix": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "delivery_rate_24h": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1
          },
          "failed_24h": {
            "type": "integer",
            "minimum": 0
          },
          "display": {
            "enum": [
              "ok",
              "att",
              "err",
              "prog",
              "brouillon",
              "neutre"
            ]
          }
        }
      },
      "WebhookCreateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "webhook",
          "signing_secret",
          "warning"
        ],
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/WebhookEndpoint"
          },
          "signing_secret": {
            "type": "string",
            "writeOnly": true
          },
          "warning": {
            "type": "string"
          }
        }
      },
      "WebhookRotateSecretResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "webhook",
          "signing_secret",
          "previous_secret_expires_at",
          "warning"
        ],
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/WebhookEndpoint"
          },
          "signing_secret": {
            "type": "string",
            "writeOnly": true
          },
          "previous_secret_expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "warning": {
            "type": "string"
          }
        }
      },
      "WebhookResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "webhook"
        ],
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/WebhookEndpoint"
          }
        }
      },
      "WebhookListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "webhooks"
        ],
        "properties": {
          "webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            }
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "project_id",
          "endpoint_id",
          "event_id",
          "status",
          "attempts",
          "next_attempt_at",
          "http_status",
          "error",
          "delivered_at",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "endpoint_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "delivering",
              "retry",
              "succeeded",
              "dead"
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0
          },
          "next_attempt_at": {
            "type": "string",
            "format": "date-time"
          },
          "http_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error": {
            "type": "string"
          },
          "delivered_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_type": {
            "type": "string"
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "response_body": {
            "type": "null"
          },
          "request_body": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "WebhookDeliveryListResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "deliveries"
        ],
        "properties": {
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          }
        }
      },
      "WebhookDeliveryResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "delivery"
        ],
        "properties": {
          "delivery": {
            "$ref": "#/components/schemas/WebhookDelivery"
          }
        }
      },
      "EmailValidationRequest": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string",
                "maxLength": 1024
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "emails"
            ],
            "properties": {
              "emails": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "type": "string",
                  "maxLength": 1024
                }
              }
            }
          }
        ]
      },
      "EmailValidation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "email",
          "normalized",
          "verdict",
          "reasons",
          "suggestion",
          "checks"
        ],
        "properties": {
          "object": {
            "const": "email_validation"
          },
          "email": {
            "type": "string",
            "description": "The address received, as is"
          },
          "normalized": {
            "type": [
              "string",
              "null"
            ],
            "description": "NFC, no leading or trailing spaces, domain in lowercase ASCII (IDNA), local part with its case; null if the syntax is invalid"
          },
          "verdict": {
            "enum": [
              "valid",
              "risky",
              "invalid",
              "unknown"
            ]
          },
          "reasons": {
            "type": "array",
            "items": {
              "enum": [
                "syntax_empty",
                "syntax_too_long",
                "syntax_at_sign",
                "syntax_local_part",
                "syntax_domain",
                "domain_literal",
                "reserved_domain",
                "domain_not_found",
                "no_mail_server",
                "null_mx",
                "disposable_domain",
                "role_account",
                "possible_typo",
                "implicit_mx",
                "quoted_local_part",
                "unicode_local_part",
                "dns_unavailable"
              ]
            }
          },
          "suggestion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Address suggested for a probable typo, never applied"
          },
          "checks": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "syntax",
              "role_account",
              "disposable",
              "mx"
            ],
            "properties": {
              "syntax": {
                "type": "boolean"
              },
              "role_account": {
                "type": "boolean"
              },
              "disposable": {
                "type": "boolean"
              },
              "mx": {
                "enum": [
                  "present",
                  "implicit",
                  "absent",
                  "null",
                  "domain_not_found",
                  "unavailable",
                  "not_checked"
                ]
              }
            }
          }
        }
      },
      "EmailValidationList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "data"
        ],
        "properties": {
          "object": {
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailValidation"
            }
          }
        }
      },
      "ProjectCostService": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "service",
          "spend_usd_cents"
        ],
        "properties": {
          "service": {
            "enum": [
              "mail",
              "storage",
              "domain",
              "functions",
              "compute",
              "backend",
              "geo",
              "search",
              "deploy",
              "ai",
              "mail_pro",
              "telecom"
            ]
          },
          "spend_usd_cents": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ProjectCostCoverage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "subscriptions",
          "usage_based"
        ],
        "properties": {
          "subscriptions": {
            "const": "measured"
          },
          "usage_based": {
            "const": "not_measured"
          }
        }
      },
      "ProjectCosts": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "project_id",
          "environment",
          "generated_at",
          "month",
          "currency",
          "basis",
          "spend_usd_cents",
          "services",
          "excluded_lines",
          "coverage"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.project-costs.v1"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "month": {
            "type": "string",
            "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"
          },
          "currency": {
            "const": "USD"
          },
          "basis": {
            "const": "active_subscriptions_monthly"
          },
          "spend_usd_cents": {
            "type": "integer",
            "minimum": 0
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectCostService"
            }
          },
          "excluded_lines": {
            "type": "integer",
            "minimum": 0
          },
          "coverage": {
            "$ref": "#/components/schemas/ProjectCostCoverage"
          }
        }
      },
      "ProjectMeteringLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "service",
          "unit",
          "quantity"
        ],
        "properties": {
          "service": {
            "enum": [
              "mail",
              "storage",
              "domain",
              "functions",
              "compute",
              "backend",
              "geo",
              "search",
              "deploy",
              "ai",
              "mail_pro",
              "telecom"
            ]
          },
          "unit": {
            "enum": [
              "byte_hour",
              "request",
              "second",
              "token_input",
              "token_output",
              "message",
              "segment",
              "domain_year",
              "gigabyte_month",
              "object"
            ]
          },
          "quantity": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,30]$",
            "description": "Exact decimal integer, encoded as text so as not to lose precision in JavaScript."
          }
        }
      },
      "ProjectMeteringCoverage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quantities",
          "customer_spend",
          "provider_reconciliation"
        ],
        "properties": {
          "quantities": {
            "enum": [
              "recorded",
              "not_recorded"
            ]
          },
          "customer_spend": {
            "const": "see_costs"
          },
          "provider_reconciliation": {
            "const": "not_exposed"
          }
        }
      },
      "ProjectMetering": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "project_id",
          "environment",
          "generated_at",
          "month",
          "status",
          "source",
          "billing_status",
          "lines",
          "coverage"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.project-metering.v1"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "month": {
            "type": "string",
            "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"
          },
          "status": {
            "enum": [
              "recorded",
              "not_recorded"
            ]
          },
          "source": {
            "const": "galon_usage_ledger_meter"
          },
          "billing_status": {
            "const": "not_invoice"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectMeteringLine"
            }
          },
          "coverage": {
            "$ref": "#/components/schemas/ProjectMeteringCoverage"
          }
        }
      },
      "PublicLimitCounter": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "customer_spend_usd_cents",
          "operations",
          "quantities"
        ],
        "properties": {
          "customer_spend_usd_cents": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,30})$"
          },
          "operations": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,30})$"
          },
          "quantities": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "pattern": "^(0|[1-9][0-9]{0,30})$"
            }
          }
        }
      },
      "PublicLimitWindow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "start",
          "end",
          "limit",
          "used",
          "reserved",
          "remaining"
        ],
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "format": "date-time"
          },
          "limit": {
            "$ref": "#/components/schemas/PublicLimitCounter"
          },
          "used": {
            "$ref": "#/components/schemas/PublicLimitCounter"
          },
          "reserved": {
            "$ref": "#/components/schemas/PublicLimitCounter"
          },
          "remaining": {
            "$ref": "#/components/schemas/PublicLimitCounter"
          }
        }
      },
      "PublicCircuit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "state",
          "reason",
          "retry_at"
        ],
        "properties": {
          "state": {
            "enum": [
              "closed",
              "open",
              "half_open"
            ]
          },
          "reason": {
            "enum": [
              null,
              "operator",
              "provider_unavailable",
              "failure_rate",
              "reconciliation",
              "cost_drift",
              "security"
            ]
          },
          "retry_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ProjectServiceLimits": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "service",
          "circuit_gate",
          "circuit",
          "soft_threshold_percent",
          "per_request",
          "daily",
          "monthly",
          "observed_at",
          "valid_until"
        ],
        "properties": {
          "service": {
            "enum": [
              "mail",
              "storage",
              "domain",
              "functions",
              "compute",
              "backend",
              "geo",
              "search",
              "deploy",
              "ai",
              "mail_pro",
              "telecom"
            ]
          },
          "circuit_gate": {
            "enum": [
              "normal",
              "paused",
              "probe_only"
            ],
            "description": "Circuit-breaker state only; never constitutes preflight authorisation."
          },
          "circuit": {
            "$ref": "#/components/schemas/PublicCircuit"
          },
          "soft_threshold_percent": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "per_request": {
            "$ref": "#/components/schemas/PublicLimitCounter"
          },
          "daily": {
            "$ref": "#/components/schemas/PublicLimitWindow"
          },
          "monthly": {
            "$ref": "#/components/schemas/PublicLimitWindow"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "valid_until": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProjectLimitsCoverage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "customer_limits",
          "provider_limits",
          "preflight_decision"
        ],
        "properties": {
          "customer_limits": {
            "enum": [
              "measured",
              "not_configured"
            ]
          },
          "provider_limits": {
            "const": "not_exposed"
          },
          "preflight_decision": {
            "const": "required_before_execution"
          }
        }
      },
      "ProjectLimits": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "project_id",
          "environment",
          "generated_at",
          "currency",
          "status",
          "source",
          "services",
          "coverage"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.project-limits.v1"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "const": "USD"
          },
          "status": {
            "enum": [
              "configured",
              "not_configured"
            ]
          },
          "source": {
            "const": "galon_budget_guard"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectServiceLimits"
            }
          },
          "coverage": {
            "$ref": "#/components/schemas/ProjectLimitsCoverage"
          }
        }
      },
      "ProjectEstimateUsage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mail": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "message": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              }
            }
          },
          "storage": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "stored_bytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "write": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "read": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "egress_bytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              }
            }
          },
          "domain": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "domain_year": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              }
            }
          },
          "functions": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "request": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "cpu_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "script": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              }
            }
          },
          "compute": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "vcpu_minute": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "ram_gib_minute": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "disk_gib_minute": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "egress_gib": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              }
            }
          },
          "backend": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "database_gib_month": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "active_user_month": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              },
              "egress_gib": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              }
            }
          },
          "geo": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "request": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              }
            }
          },
          "search": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "request": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000
              }
            }
          }
        }
      },
      "ProjectEstimateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "besoin"
        ],
        "properties": {
          "besoin": {
            "type": "string",
            "minLength": 3,
            "maxLength": 1200
          },
          "priorite": {
            "enum": [
              "prix",
              "simplicite",
              "performance",
              "souverainete"
            ]
          },
          "volume_mensuel": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "budget_mensuel_usd": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "region": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "usage": {
            "$ref": "#/components/schemas/ProjectEstimateUsage"
          }
        }
      },
      "CloudEstimateLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "service",
          "product",
          "status",
          "plan_id",
          "requested_usage",
          "included_usage",
          "monthly_price_cents",
          "availability",
          "price_status",
          "free_tier_eligibility_required",
          "execution_ready"
        ],
        "properties": {
          "service": {
            "enum": [
              "mail",
              "storage",
              "domain",
              "functions",
              "compute",
              "backend",
              "geo",
              "search"
            ]
          },
          "product": {
            "type": "string"
          },
          "status": {
            "enum": [
              "missing_usage",
              "quote_required",
              "priced"
            ]
          },
          "plan_id": {
            "type": "string"
          },
          "requested_usage": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "included_usage": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "monthly_price_cents": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "availability": {
            "enum": [
              "indisponible",
              "pilote",
              "beta",
              "disponible"
            ]
          },
          "price_status": {
            "enum": [
              "validated",
              "proposal"
            ]
          },
          "free_tier_eligibility_required": {
            "type": "boolean"
          },
          "execution_ready": {
            "type": "boolean"
          }
        }
      },
      "CloudEstimate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "catalog_version",
          "price_version",
          "pricing_fingerprint",
          "estimated_at",
          "expires_at",
          "currency",
          "amount_unit",
          "tax_status",
          "overage_policy",
          "status",
          "orientation_fingerprint",
          "primary_service",
          "declared_monthly_volume",
          "requested_region",
          "lines",
          "monthly_total_cents",
          "budget_fit",
          "questions",
          "warnings",
          "blockers",
          "activation_seal",
          "effects_allowed",
          "execution",
          "fingerprint"
        ],
        "properties": {
          "schema": {
            "const": "galon.cloud.estimate.v1"
          },
          "catalog_version": {
            "type": "string"
          },
          "price_version": {
            "type": "string"
          },
          "pricing_fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "estimated_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "const": "USD"
          },
          "amount_unit": {
            "const": "cent"
          },
          "tax_status": {
            "const": "no_tax_applied"
          },
          "overage_policy": {
            "const": "blocked_or_requoted"
          },
          "status": {
            "enum": [
              "priced_ready",
              "priced_blocked",
              "incomplete"
            ]
          },
          "orientation_fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "primary_service": {
            "type": "string"
          },
          "declared_monthly_volume": {
            "type": [
              "integer",
              "null"
            ]
          },
          "requested_region": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CloudEstimateLine"
            }
          },
          "monthly_total_cents": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "budget_fit": {
            "enum": [
              "unknown",
              "within",
              "exceeded"
            ]
          },
          "questions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "activation_seal": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "effects_allowed": {
            "const": false
          },
          "execution": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "allowed",
              "reason"
            ],
            "properties": {
              "allowed": {
                "const": false
              },
              "reason": {
                "type": "string"
              }
            }
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      },
      "ProjectEstimate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "project_id",
          "environment",
          "estimate",
          "fingerprint"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.project-estimate.v1"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "estimate": {
            "$ref": "#/components/schemas/CloudEstimate"
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      },
      "ProjectPreparationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "estimate"
        ],
        "properties": {
          "estimate": {
            "$ref": "#/components/schemas/ProjectEstimate"
          }
        }
      },
      "ProjectPreparationSelection": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "service",
          "product",
          "plan_id",
          "monthly_price_cents",
          "requested_usage"
        ],
        "properties": {
          "service": {
            "enum": [
              "mail",
              "storage",
              "domain",
              "functions",
              "compute",
              "backend",
              "geo",
              "search"
            ]
          },
          "product": {
            "type": "string"
          },
          "plan_id": {
            "type": "string"
          },
          "monthly_price_cents": {
            "type": "integer",
            "minimum": 0
          },
          "requested_usage": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      },
      "ProjectPreparation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "project_id",
          "environment",
          "preparation_id",
          "estimate_fingerprint",
          "preparation_fingerprint",
          "status",
          "monthly_total_cents",
          "selections",
          "blockers",
          "expires_at",
          "effects_allowed",
          "executable",
          "approval_required",
          "next_step",
          "replayed",
          "fingerprint"
        ],
        "properties": {
          "schema": {
            "const": "galon.api.project-preparation.v1"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "environment": {
            "enum": [
              "test",
              "live"
            ]
          },
          "preparation_id": {
            "type": "string",
            "format": "uuid"
          },
          "estimate_fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "preparation_fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "status": {
            "enum": [
              "prepared",
              "blocked"
            ]
          },
          "monthly_total_cents": {
            "type": "integer",
            "minimum": 0
          },
          "selections": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ProjectPreparationSelection"
            }
          },
          "blockers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "effects_allowed": {
            "const": false
          },
          "executable": {
            "const": false
          },
          "approval_required": {
            "const": true
          },
          "next_step": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      },
      "StorageBucketCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "placement"
        ],
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$"
          },
          "placement": {
            "type": "string",
            "enum": [
              "global",
              "eu",
              "africa-west"
            ]
          }
        }
      },
      "StorageBucket": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "id",
          "name",
          "placement",
          "state",
          "created_at"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.bucket.v1"
          },
          "id": {
            "type": "string",
            "pattern": "^bkt_[0-9a-f]{32}$"
          },
          "name": {
            "type": "string"
          },
          "placement": {
            "type": "string",
            "enum": [
              "global",
              "eu",
              "africa-west"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "provisioning",
              "ready",
              "suspended",
              "deleting",
              "error"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StorageJob": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "id",
          "operation",
          "state",
          "resource_id",
          "error_code",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.job.v1"
          },
          "id": {
            "type": "string",
            "pattern": "^job_[0-9a-f]{32}$"
          },
          "operation": {
            "type": "string",
            "enum": [
              "bucket.create",
              "bucket.delete",
              "object.put",
              "object.delete"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "retrying",
              "succeeded",
              "failed",
              "indeterminate",
              "reconciling",
              "canceled"
            ]
          },
          "resource_id": {
            "type": "string"
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StorageBucketReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "operation_id",
          "bucket",
          "job",
          "replayed"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.operation.v1"
          },
          "operation_id": {
            "type": "string"
          },
          "bucket": {
            "$ref": "#/components/schemas/StorageBucket"
          },
          "job": {
            "$ref": "#/components/schemas/StorageJob"
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "StorageBucketPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "items",
          "next_cursor"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.bucket-page.v1"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageBucket"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StorageObject": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "id",
          "bucket_id",
          "key",
          "size_bytes",
          "checksum",
          "state",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.item.v1"
          },
          "id": {
            "type": "string",
            "pattern": "^obj_[0-9a-f]{32}$"
          },
          "bucket_id": {
            "type": "string",
            "pattern": "^bkt_[0-9a-f]{32}$"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "description": "UTF-8, at most 1024 bytes, without a leading / or control characters"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "checksum": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "available",
              "deleting"
            ],
            "description": "available after commit; deleting after a deletion request"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StorageObjectPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "items",
          "next_cursor"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.object-page.v1"
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/StorageObject"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StorageObjectDeletion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "object",
          "job",
          "replayed"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.deletion.v1"
          },
          "object": {
            "$ref": "#/components/schemas/StorageObject"
          },
          "job": {
            "$ref": "#/components/schemas/StorageJob"
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "StorageUploadCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "size_bytes",
          "checksum"
        ],
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "description": "UTF-8, at most 1024 bytes, without a leading / or control characters"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "capped by the qualified data plane (at most 5 GiB for a simple PUT)"
          },
          "checksum": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$"
          }
        }
      },
      "StorageUpload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "id",
          "bucket_id",
          "key",
          "size_bytes",
          "checksum",
          "state",
          "reservation_expires_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.upload.v1"
          },
          "id": {
            "type": "string",
            "pattern": "^upl_[0-9a-f]{32}$"
          },
          "bucket_id": {
            "type": "string",
            "pattern": "^bkt_[0-9a-f]{32}$"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "description": "UTF-8, at most 1024 bytes, without a leading / or control characters"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "checksum": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "reserved",
              "committed",
              "expired"
            ]
          },
          "reservation_expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StorageUploadCapability": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "id",
          "method",
          "url",
          "headers",
          "expires_at"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.upload-capability.v1"
          },
          "id": {
            "type": "string",
            "pattern": "^cap_[0-9a-f]{32}$"
          },
          "method": {
            "const": "PUT"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "headers": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "content-length",
              "if-none-match",
              "x-galon-checksum-sha256"
            ],
            "properties": {
              "content-length": {
                "type": "string"
              },
              "if-none-match": {
                "const": "*"
              },
              "x-galon-checksum-sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              }
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StorageUploadCommit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "upload",
          "object",
          "job",
          "replayed"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.upload-commit.v1"
          },
          "upload": {
            "$ref": "#/components/schemas/StorageUpload"
          },
          "object": {
            "$ref": "#/components/schemas/StorageObject"
          },
          "job": {
            "$ref": "#/components/schemas/StorageJob"
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "StorageUploadReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "upload",
          "capability",
          "commit",
          "replayed"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.upload.v1.receipt"
          },
          "upload": {
            "$ref": "#/components/schemas/StorageUpload"
          },
          "capability": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StorageUploadCapability"
              },
              {
                "type": "null"
              }
            ]
          },
          "commit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StorageUploadCommit"
              },
              {
                "type": "null"
              }
            ]
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "StorageUsage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "quota_bytes",
          "reserved_bytes",
          "committed_bytes",
          "pending_deletion_bytes",
          "available_bytes"
        ],
        "properties": {
          "schema": {
            "const": "galon.object.usage.v1"
          },
          "quota_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "reserved_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "committed_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "pending_deletion_bytes": {
            "type": "integer",
            "minimum": 0,
            "description": "share of committed_bytes awaiting purge"
          },
          "available_bytes": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "NextAction": {
        "type": "object",
        "required": [
          "code",
          "hint",
          "docs_url"
        ],
        "description": "What to do next about an error. Present on every public error (API v1 and MCP tools).",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "use_valid_api_key",
              "add_missing_scope",
              "use_full_access_key",
              "use_key_of_right_environment",
              "sign_in_again",
              "check_project_access",
              "top_up_balance",
              "raise_limit_or_plan",
              "raise_app_spend_limit",
              "add_and_verify_domain",
              "activate_mail_plan",
              "choose_plan",
              "retry_after_delay",
              "check_resource_id",
              "fix_request",
              "fix_tool_arguments",
              "resolve_conflict",
              "start_again",
              "retry_later",
              "request_human_approval",
              "await_human_approval",
              "connect_app_with_oauth",
              "list_tools",
              "use_supported_method",
              "fix_jsonrpc_message"
            ],
            "description": "Stable action code. Act on it, not on hint."
          },
          "hint": {
            "type": "string",
            "description": "What to do next, in English."
          },
          "docs_url": {
            "type": "string",
            "format": "uri",
            "description": "Documentation page for this action."
          },
          "console_url": {
            "type": "string",
            "format": "uri",
            "description": "Console page where a human must act (keys, balance, plan). Absent when no human step is needed."
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "Error body. Act on detail.code, then follow detail.next_action. When detail is not an object (framework validation list), next_action is at the top level.",
        "properties": {
          "detail": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable error code."
              },
              "message": {
                "type": "string",
                "description": "Human-readable message (follows Accept-Language)."
              },
              "next_action": {
                "$ref": "#/components/schemas/NextAction"
              }
            }
          },
          "next_action": {
            "$ref": "#/components/schemas/NextAction"
          }
        }
      },
      "GeoPlace": {
        "description": "A place: [lon, lat] (GeoJSON order), {\"lat\", \"lon\"}, or a string. A string that follows the GPS grammar (\"5.3364, -4.0267\", \"5.3364 N, 4.0267 W\", degrees-minutes-seconds) is read as coordinates; any other string is an address, geocoded and billed as one geocode.",
        "anyOf": [
          {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {
              "type": "number"
            },
            "description": "[lon, lat]"
          },
          {
            "type": "object",
            "required": [
              "lat",
              "lon"
            ],
            "description": "Separate coordinates",
            "properties": {
              "lat": {
                "type": "number",
                "minimum": -90,
                "maximum": 90,
                "description": "Latitude."
              },
              "lon": {
                "type": "number",
                "minimum": -180,
                "maximum": 180,
                "description": "Longitude."
              }
            }
          },
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "GPS text or an address"
          }
        ]
      },
      "GeoResolvedPlace": {
        "type": "object",
        "description": "A place as resolved by the server, in request order.",
        "properties": {
          "input": {
            "type": "string",
            "enum": [
              "coordinates",
              "address"
            ],
            "description": "How the place was given."
          },
          "coordinates": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "[lon, lat]."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address found, when the input was an address."
          }
        }
      },
      "GeoFeatureCollection": {
        "type": "object",
        "description": "GeoJSON FeatureCollection with Galon fields.",
        "properties": {
          "type": {
            "const": "FeatureCollection",
            "description": "GeoJSON type."
          },
          "operation": {
            "type": "string",
            "description": "The operation that answered."
          },
          "features": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "GeoJSON features."
          },
          "attribution": {
            "type": "object",
            "description": "Map data credit to display."
          },
          "receipt": {
            "$ref": "#/components/schemas/GeoReceipt"
          }
        }
      },
      "GeoReceipt": {
        "type": "object",
        "description": "What this answer cost.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Receipt id (also in the Galon-Receipt header)."
          },
          "operation": {
            "type": "string",
            "description": "Main operation."
          },
          "units": {
            "type": "integer",
            "description": "Units of the main operation."
          },
          "amount_micro_usd": {
            "type": "integer",
            "description": "Total amount, in millionths of a US dollar."
          },
          "lines": {
            "type": "array",
            "description": "Per class, when more than one class was billed.",
            "items": {
              "type": "object",
              "description": "operation, units, unit_price_micro_usd, amount_micro_usd"
            }
          }
        }
      },
      "GeoRouteRequest": {
        "type": "object",
        "required": [
          "waypoints"
        ],
        "description": "A route request.",
        "properties": {
          "profile": {
            "type": "string",
            "enum": [
              "driving",
              "walking",
              "cycling",
              "two_wheeler"
            ],
            "description": "Travel mode (default driving)."
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "fr",
              "es",
              "de",
              "pt",
              "it",
              "ar",
              "zh",
              "ja",
              "ko",
              "hi",
              "bn",
              "ru",
              "id",
              "sw",
              "ha",
              "yo"
            ],
            "description": "Language of the steps."
          },
          "waypoints": {
            "type": "array",
            "minItems": 2,
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/GeoPlace"
            },
            "description": "2 to 25 places, in travel order."
          }
        }
      },
      "GeoMatrixRequest": {
        "type": "object",
        "required": [
          "sources"
        ],
        "description": "A matrix request.",
        "properties": {
          "profile": {
            "type": "string",
            "enum": [
              "driving",
              "walking",
              "cycling",
              "two_wheeler"
            ],
            "description": "Travel mode (default driving)."
          },
          "sources": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/GeoPlace"
            },
            "description": "1 to 25 starting places."
          },
          "destinations": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/GeoPlace"
            },
            "description": "1 to 25 arrival places (default: the sources)."
          }
        }
      },
      "GeoMatrix": {
        "type": "object",
        "description": "A distance matrix.",
        "properties": {
          "object": {
            "const": "geo_matrix",
            "description": "Object type."
          },
          "profile": {
            "type": "string",
            "enum": [
              "driving",
              "walking",
              "cycling",
              "two_wheeler"
            ],
            "description": "Travel mode (default driving)."
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeoResolvedPlace"
            },
            "description": "Resolved sources."
          },
          "destinations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeoResolvedPlace"
            },
            "description": "Resolved destinations."
          },
          "durations_s": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "description": "Seconds, one row per source; null: no path."
          },
          "distances_m": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "description": "Metres, one row per source; null: no path."
          },
          "attribution": {
            "type": "object",
            "description": "Map data credit to display."
          },
          "receipt": {
            "$ref": "#/components/schemas/GeoReceipt"
          }
        }
      },
      "GeoIsochroneRequest": {
        "type": "object",
        "required": [
          "center"
        ],
        "description": "Give minutes or meters, not both.",
        "properties": {
          "profile": {
            "type": "string",
            "enum": [
              "driving",
              "walking",
              "cycling",
              "two_wheeler"
            ],
            "description": "Travel mode (default driving)."
          },
          "center": {
            "$ref": "#/components/schemas/GeoPlace"
          },
          "minutes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 4,
            "description": "1 to 4 increasing times, 1 to 60.",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          },
          "meters": {
            "type": "array",
            "minItems": 1,
            "maxItems": 4,
            "description": "1 to 4 increasing distances, 100 to 50,000.",
            "items": {
              "type": "integer",
              "minimum": 100,
              "maximum": 50000
            }
          }
        }
      },
      "BrowserKey": {
        "type": "object",
        "description": "A browser key (public): Geo only, declared origins, daily cap.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Key id."
          },
          "type": {
            "const": "browser",
            "description": "Key type."
          },
          "api_key": {
            "type": "string",
            "description": "The key, gln_pk_test_… or gln_pk_live_… (on creation and copy)."
          },
          "prefix": {
            "type": "string",
            "description": "Readable start of the key."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name."
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "live"
            ],
            "description": "Environment."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Geo scopes."
          },
          "origins": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowed sites."
          },
          "daily_cap": {
            "type": "integer",
            "description": "Billed units per UTC day."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoquee"
            ],
            "description": "State."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation."
          }
        }
      },
      "BrowserKeyList": {
        "type": "object",
        "description": "Browser keys of a project.",
        "properties": {
          "browser_keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrowserKey"
            },
            "description": "Keys, newest first."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Scopes a browser key can carry."
          },
          "limits": {
            "type": "object",
            "description": "keys_per_project, origins_per_key, daily_cap_default, daily_cap_max, daily_cap_unit, rate_per_minute_per_visitor, revocation_delay_s"
          }
        }
      },
      "BrowserKeyCreate": {
        "type": "object",
        "required": [
          "scopes",
          "origins"
        ],
        "additionalProperties": false,
        "description": "One screen: sites, scopes, optional cap and name.",
        "properties": {
          "origins": {
            "type": "array",
            "minItems": 1,
            "maxItems": 20,
            "description": "Sites allowed to use the key: example.com, *.example.com (subdomains), https://example.com:8443, localhost:3000. https only, except localhost.",
            "items": {
              "type": "string",
              "maxLength": 300,
              "description": "One site."
            }
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "description": "geo:geocode, geo:route, geo:maps.",
            "items": {
              "type": "string",
              "enum": [
                "geo:geocode",
                "geo:route",
                "geo:maps"
              ]
            }
          },
          "daily_cap": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "description": "Billed units per UTC day (default 10,000)."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Name."
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "live"
            ],
            "description": "The project environment (default test)."
          }
        }
      },
      "BrowserKeyUpdate": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 1,
        "description": "What changes.",
        "properties": {
          "origins": {
            "type": "array",
            "minItems": 1,
            "maxItems": 20,
            "description": "Sites allowed to use the key: example.com, *.example.com (subdomains), https://example.com:8443, localhost:3000. https only, except localhost.",
            "items": {
              "type": "string",
              "maxLength": 300,
              "description": "One site."
            }
          },
          "daily_cap": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "description": "Billed units per UTC day."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Name."
          }
        }
      },
      "CrawlErrorsResponse": {
        "type": "object",
        "required": [
          "success",
          "errors",
          "robotsBlocked"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "url",
                "code",
                "error"
              ],
              "properties": {
                "url": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              }
            }
          },
          "robotsBlocked": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CrawlFormat": {
        "type": "string",
        "enum": [
          "markdown",
          "html",
          "rawHtml",
          "links"
        ],
        "description": "Outputs Galon serves. screenshot, json, extract, changeTracking, summary, branding, images, attributes, product and menu are refused by name (format_unsupported)."
      },
      "CrawlScrapeOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "formats": {
            "type": "array",
            "minItems": 1,
            "maxItems": 8,
            "items": {
              "$ref": "#/components/schemas/CrawlFormat"
            },
            "default": [
              "markdown"
            ]
          },
          "onlyMainContent": {
            "type": "boolean",
            "default": true,
            "description": "Main content only (no header, nav, footer)."
          },
          "includeTags": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Tags or selectors (tag, .class, #id) to keep."
          },
          "excludeTags": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Tags or selectors to drop."
          },
          "timeout": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 300000,
            "default": 30000,
            "description": "Milliseconds; values above 60000 are capped (warning timeout_capped)."
          },
          "waitFor": {
            "type": "integer",
            "description": "Refused unless 0: no JavaScript rendering (javascript_rendering_unavailable)."
          },
          "actions": {
            "type": "array",
            "maxItems": 0,
            "description": "Refused unless empty: no JavaScript rendering."
          },
          "removeBase64Images": {
            "type": "boolean",
            "description": "Accepted without effect."
          },
          "blockAds": {
            "type": "boolean",
            "description": "Accepted without effect."
          },
          "storeInCache": {
            "type": "boolean",
            "description": "Accepted without effect: scrape keeps no content."
          },
          "maxAge": {
            "type": "integer",
            "description": "Accepted without effect."
          },
          "proxy": {
            "type": "string",
            "enum": [
              "basic",
              "auto"
            ],
            "description": "Other values refused (option_unsupported)."
          }
        }
      },
      "CrawlScrapeRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CrawlScrapeOptions"
          },
          {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "maxLength": 2048,
                "description": "Absolute http(s) address on a standard port, without credentials."
              }
            }
          }
        ]
      },
      "CrawlMetadata": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "nullable": true
          },
          "canonicalURL": {
            "type": "string"
          },
          "ogImage": {
            "type": "string"
          },
          "sourceURL": {
            "type": "string",
            "description": "The address asked"
          },
          "url": {
            "type": "string",
            "description": "The address read, after redirects"
          },
          "statusCode": {
            "type": "integer"
          },
          "contentType": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CrawlPage": {
        "type": "object",
        "required": [
          "metadata"
        ],
        "properties": {
          "markdown": {
            "type": "string",
            "maxLength": 1000000
          },
          "html": {
            "type": "string",
            "description": "Cleaned HTML of the content kept"
          },
          "rawHtml": {
            "type": "string",
            "description": "The HTML as served"
          },
          "links": {
            "type": "array",
            "maxItems": 1000,
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/CrawlMetadata"
          }
        }
      },
      "CrawlScrapeResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CrawlPage"
          },
          "warning": {
            "type": "string",
            "description": "A value was capped (timeout_capped)"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CrawlMapRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "search": {
            "type": "string",
            "maxLength": 200,
            "description": "Addresses that contain this text come first."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "default": 100,
            "description": "Values above 1000 are capped (warning map_limit_capped)."
          },
          "includeSubdomains": {
            "type": "boolean",
            "default": true
          },
          "ignoreSitemap": {
            "type": "boolean",
            "default": false
          },
          "sitemapOnly": {
            "type": "boolean",
            "default": false
          },
          "sitemap": {
            "type": "string",
            "enum": [
              "include",
              "skip",
              "only"
            ]
          },
          "timeout": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 300000,
            "default": 30000
          },
          "ignoreQueryParameters": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "CrawlMapResponse": {
        "type": "object",
        "required": [
          "success",
          "links"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "links": {
            "type": "array",
            "maxItems": 1000,
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "warning": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CrawlStartRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "default": 10,
            "description": "Values above 100 are capped (warning limit_capped)."
          },
          "maxDepth": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5,
            "default": 2
          },
          "maxDiscoveryDepth": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5,
            "description": "Alias of maxDepth (not both)."
          },
          "includePaths": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Regular expressions on the path; nested repetition refused (pattern_unsafe)."
          },
          "excludePaths": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 200
            }
          },
          "crawlEntireDomain": {
            "type": "boolean",
            "default": false
          },
          "allowBackwardLinks": {
            "type": "boolean",
            "description": "Alias of crawlEntireDomain."
          },
          "allowSubdomains": {
            "type": "boolean",
            "default": false
          },
          "allowExternalLinks": {
            "type": "boolean",
            "description": "Refused unless false (option_unsupported)."
          },
          "ignoreSitemap": {
            "type": "boolean",
            "default": false
          },
          "sitemap": {
            "type": "string",
            "enum": [
              "include",
              "skip",
              "only"
            ]
          },
          "ignoreQueryParameters": {
            "type": "boolean",
            "default": false
          },
          "delay": {
            "type": "number",
            "minimum": 0,
            "maximum": 10,
            "description": "Seconds between pages; never below 1."
          },
          "maxConcurrency": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Accepted without effect: one page at a time per job."
          },
          "scrapeOptions": {
            "$ref": "#/components/schemas/CrawlScrapeOptions"
          },
          "webhook": {
            "description": "Refused unless empty (option_unsupported)."
          },
          "prompt": {
            "type": "string",
            "description": "Refused unless empty (option_unsupported)."
          }
        }
      },
      "CrawlStartResponse": {
        "type": "object",
        "required": [
          "success",
          "id",
          "url"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Where to read the job: GET /search/v2/crawl/{id}"
          },
          "warning": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CrawlStatusResponse": {
        "type": "object",
        "required": [
          "success",
          "status",
          "id",
          "total",
          "completed",
          "creditsUsed",
          "expiresAt",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "status": {
            "type": "string",
            "enum": [
              "scraping",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "total": {
            "type": "integer",
            "description": "Pages discovered within the limit"
          },
          "completed": {
            "type": "integer",
            "description": "Pages read"
          },
          "creditsUsed": {
            "type": "integer",
            "description": "Pages counted (one per page read)"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "next": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The next 20 pages, or null"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrawlPage"
            }
          },
          "error": {
            "type": "string",
            "description": "Present when the job failed or stopped early"
          },
          "code": {
            "type": "string",
            "description": "crawl_failed, crawl_interrupted, crawl_time_limit, or the first page refusal"
          }
        }
      },
      "CrawlCancelResponse": {
        "type": "object",
        "required": [
          "success",
          "status"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "status": {
            "type": "string",
            "enum": [
              "scraping",
              "completed",
              "failed",
              "cancelled"
            ]
          }
        }
      },
      "CrawlError": {
        "type": "object",
        "required": [
          "success",
          "error",
          "code",
          "detail"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string",
            "description": "The public message"
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "object",
            "required": [
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "format": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Key missing or invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Invalid": {
        "description": "Invalid parameters",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "JobProjectionInvalid": {
        "description": "job_projection_invalid: the server refuses to publish a result that does not satisfy its closed public schema",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}