{
  "components": {
    "schemas": {
      "AcceptInviteInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "password": {
            "maxLength": 72,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AcceptTransferInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "Your name, when the email has no account yet",
            "maxLength": 100,
            "type": "string"
          },
          "new_workspace": {
            "description": "For a service, the name of a new workspace to move it to instead",
            "maxLength": 100,
            "type": "string"
          },
          "password": {
            "description": "A password for the new account",
            "maxLength": 72,
            "type": "string"
          },
          "workspace_id": {
            "description": "For a service, the workspace you own to move it to",
            "maxLength": 36,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccountExport": {
        "additionalProperties": false,
        "properties": {
          "activity": {
            "description": "Activity log entries where you are the actor",
            "items": {
              "$ref": "#/components/schemas/AuditOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "email_settings": {
            "items": {
              "$ref": "#/components/schemas/TopicSetting"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "exported_at": {
            "format": "date-time",
            "type": "string"
          },
          "invites": {
            "description": "Invites sent to your address and invites you sent",
            "items": {
              "$ref": "#/components/schemas/ExportInvite"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "notes": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "passkeys": {
            "items": {
              "$ref": "#/components/schemas/ExportPasskey"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "profile": {
            "$ref": "#/components/schemas/ExportProfile"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "terms": {
            "$ref": "#/components/schemas/ExportTerms"
          },
          "workspaces": {
            "items": {
              "$ref": "#/components/schemas/ExportMember"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "exported_at",
          "profile",
          "terms",
          "email_settings",
          "sessions",
          "passkeys",
          "workspaces",
          "invites",
          "activity",
          "notes"
        ],
        "type": "object"
      },
      "AccountWorkspace": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "other_members": {
            "format": "int64",
            "type": "integer"
          },
          "role": {
            "type": "string"
          },
          "services": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "other_members",
          "services"
        ],
        "type": "object"
      },
      "ApplicationOut": {
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "description": "What the app sends as client_id",
            "type": "string"
          },
          "consent_screen": {
            "description": "Ask people to allow the app before it signs them in, for partner apps",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "description": "The last time the app got tokens",
            "format": "date-time",
            "type": "string"
          },
          "logout_uris": {
            "description": "Where the app may send people after they sign out, as post_logout_redirect_uri",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "previous_secret_expires_at": {
            "description": "When the secret replaced by the last rotation stops working",
            "format": "date-time",
            "type": "string"
          },
          "redirect_uris": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "refresh_tokens": {
            "type": "boolean"
          },
          "secret_hint": {
            "description": "The first characters of the current secret. Web apps only.",
            "type": "string"
          },
          "type": {
            "description": "Web apps keep a secret on a server. Single page and native apps are public and rely on PKCE.",
            "enum": [
              "web",
              "spa",
              "native"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "client_id",
          "name",
          "type",
          "redirect_uris",
          "logout_uris",
          "refresh_tokens",
          "consent_screen",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ApplicationSecretBody": {
        "additionalProperties": false,
        "properties": {
          "application": {
            "$ref": "#/components/schemas/ApplicationOut"
          },
          "client_secret": {
            "description": "Shown only this once. Web apps only.",
            "type": "string"
          }
        },
        "required": [
          "application"
        ],
        "type": "object"
      },
      "ApplicationsBody": {
        "additionalProperties": false,
        "properties": {
          "applications": {
            "items": {
              "$ref": "#/components/schemas/ApplicationOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "limit": {
            "description": "How many applications the service's plan allows",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "applications",
          "limit"
        ],
        "type": "object"
      },
      "AuditBody": {
        "additionalProperties": false,
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/AuditOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "next_before": {
            "type": "string"
          }
        },
        "required": [
          "events"
        ],
        "type": "object"
      },
      "AuditOut": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string"
          },
          "actor_id": {
            "type": "string"
          },
          "actor_name": {
            "type": "string"
          },
          "actor_type": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "customer_name": {
            "type": "string"
          },
          "details": {
            "additionalProperties": {},
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "service_id": {
            "type": "string"
          },
          "service_name": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "target_type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "actor_type",
          "actor_id",
          "actor_name",
          "action",
          "target_type",
          "target_id",
          "summary",
          "ip",
          "details"
        ],
        "type": "object"
      },
      "AutoRechargeOut": {
        "additionalProperties": false,
        "properties": {
          "amount_cents": {
            "format": "int32",
            "type": "integer"
          },
          "card": {
            "$ref": "#/components/schemas/CardOut",
            "description": "The card automatic top ups charge"
          },
          "charging": {
            "description": "A top up is being charged or starts within a few minutes",
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "failed_at": {
            "format": "date-time",
            "type": "string"
          },
          "has_card": {
            "type": "boolean"
          },
          "threshold_micro": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "threshold_micro",
          "amount_cents",
          "has_card",
          "charging"
        ],
        "type": "object"
      },
      "BillingInBody": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "description": "true lets the API charge its customers, false turns billing off",
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "CardOut": {
        "additionalProperties": false,
        "properties": {
          "brand": {
            "description": "Card brand as Stripe names it, like visa or mastercard",
            "type": "string"
          },
          "exp_month": {
            "format": "int64",
            "type": "integer"
          },
          "exp_year": {
            "format": "int64",
            "type": "integer"
          },
          "label": {
            "examples": [
              "Visa ending in 4242, expires 08/29"
            ],
            "type": "string"
          },
          "last4": {
            "type": "string"
          }
        },
        "required": [
          "brand",
          "last4",
          "exp_month",
          "exp_year",
          "label"
        ],
        "type": "object"
      },
      "CeremonyBody": {
        "additionalProperties": false,
        "properties": {
          "ceremony": {
            "description": "Send this back with the browser's answer. It works once, within 5 minutes.",
            "type": "string"
          },
          "options": {
            "description": "Pass options.publicKey to navigator.credentials.create() or get()"
          }
        },
        "required": [
          "ceremony",
          "options"
        ],
        "type": "object"
      },
      "ChallengeInBody": {
        "additionalProperties": false,
        "properties": {
          "challenge": {
            "description": "From /auth/login",
            "maxLength": 1000,
            "type": "string"
          }
        },
        "required": [
          "challenge"
        ],
        "type": "object"
      },
      "CheckNote": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "enum": [
              "blocked",
              "timeout",
              "redirect",
              "too_large",
              "unreachable",
              "not_found",
              "bad_status",
              "not_json",
              "resource_mismatch",
              "issuer_missing",
              "no_challenge"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "CodeInBody": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "description": "The 6 digit code from the email",
            "maxLength": 6,
            "minLength": 6,
            "type": "string"
          },
          "email": {
            "maxLength": 254,
            "type": "string"
          }
        },
        "required": [
          "email",
          "code"
        ],
        "type": "object"
      },
      "ConfirmBody": {
        "additionalProperties": false,
        "properties": {
          "confirmed_until": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "confirmed_until"
        ],
        "type": "object"
      },
      "ConfirmInBody": {
        "additionalProperties": false,
        "properties": {
          "ceremony": {
            "description": "For passkey, from /me/confirm/begin",
            "type": "string"
          },
          "code": {
            "description": "For code, an authenticator or recovery code. For email, the 6 digit code from the email.",
            "maxLength": 20,
            "type": "string"
          },
          "credential": {
            "description": "For passkey, the PublicKeyCredential from the browser, as JSON"
          },
          "method": {
            "enum": [
              "passkey",
              "code",
              "email"
            ],
            "type": "string"
          }
        },
        "required": [
          "method"
        ],
        "type": "object"
      },
      "ConnectedAppOut": {
        "additionalProperties": false,
        "properties": {
          "blocked_at": {
            "description": "Blocked apps can't sign anyone in or refresh tokens",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "client_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "from": {
            "description": "The host that serves the metadata document",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "description": "registered when the app used dynamic client registration, metadata when its client_id is the URL of its metadata document",
            "enum": [
              "registered",
              "metadata"
            ],
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "The name the app gave itself. Nobody checked it.",
            "type": "string"
          },
          "redirect_uris": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "type": {
            "enum": [
              "web",
              "native"
            ],
            "type": "string"
          },
          "unverified": {
            "description": "Always true for apps people connect",
            "type": "boolean"
          },
          "users": {
            "description": "How many people connected it",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "client_id",
          "name",
          "kind",
          "type",
          "redirect_uris",
          "unverified",
          "users",
          "blocked_at",
          "last_used_at",
          "created_at"
        ],
        "type": "object"
      },
      "ConnectedAppsBody": {
        "additionalProperties": false,
        "properties": {
          "apps": {
            "items": {
              "$ref": "#/components/schemas/ConnectedAppOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "apps"
        ],
        "type": "object"
      },
      "ConnectionBody": {
        "additionalProperties": false,
        "properties": {
          "customers": {
            "format": "int64",
            "type": "integer"
          },
          "first_usage_at": {
            "format": "date-time",
            "type": "string"
          },
          "plans": {
            "description": "Active plans, public or private",
            "format": "int64",
            "type": "integer"
          },
          "sdk_agent": {
            "type": "string"
          },
          "sdk_connected": {
            "description": "The SDK fetched a snapshot in the last 10 minutes",
            "type": "boolean"
          },
          "sdk_first_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "sdk_last_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "stripe_ready": {
            "type": "boolean"
          },
          "test_requests": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "sdk_connected",
          "test_requests",
          "customers",
          "stripe_ready",
          "plans"
        ],
        "type": "object"
      },
      "ConnectionClaims": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Defaults to email",
            "maxLength": 100,
            "type": "string"
          },
          "name": {
            "description": "Defaults to name",
            "maxLength": 100,
            "type": "string"
          },
          "subject": {
            "description": "Defaults to sub. Use dots for nested fields, like data.id.",
            "maxLength": 100,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ConnectionOut": {
        "additionalProperties": false,
        "properties": {
          "authorization_url": {
            "description": "OpenID Connect and OAuth 2.0 only",
            "type": "string"
          },
          "available": {
            "description": "Enabled and included in the service's plan, so people can use it now",
            "type": "boolean"
          },
          "callback_url": {
            "description": "Register this at the provider as the callback or redirect URL",
            "type": "string"
          },
          "callback_urls": {
            "description": "The callback URL on every address the service answers on, including a custom domain. Register each one.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "claims": {
            "$ref": "#/components/schemas/ConnectionClaims",
            "description": "OAuth 2.0 only. Where the userinfo answer holds each value."
          },
          "client_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "discovery_url": {
            "description": "OpenID Connect only",
            "type": "string"
          },
          "enabled": {
            "description": "The sign in and sign up pages show a button for it",
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "issuer": {
            "description": "OpenID Connect only, read from the discovery document",
            "type": "string"
          },
          "kind": {
            "enum": [
              "google",
              "github",
              "oidc",
              "oauth2"
            ],
            "type": "string"
          },
          "linked_users": {
            "description": "How many people connected it",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "description": "Shown on the sign in button",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "secret_updated_at": {
            "description": "When the client secret was last set. The secret itself is never returned.",
            "format": "date-time",
            "type": "string"
          },
          "slug": {
            "description": "Ends the callback URL, so it can't change",
            "type": "string"
          },
          "token_auth": {
            "description": "OpenID Connect and OAuth 2.0 only. How MicroAuth sends the client secret to the token endpoint: basic (HTTP Basic) or post (in the form). OpenID Connect reads it from discovery.",
            "enum": [
              "basic",
              "post"
            ],
            "type": "string"
          },
          "token_url": {
            "description": "OpenID Connect and OAuth 2.0 only",
            "type": "string"
          },
          "trust_emails": {
            "description": "OpenID Connect and OAuth 2.0 only. The provider's emails count as verified, so a first sign in links to the account with the same email.",
            "type": "boolean"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "userinfo_url": {
            "description": "OpenID Connect and OAuth 2.0 only",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "slug",
          "name",
          "enabled",
          "available",
          "client_id",
          "secret_updated_at",
          "scopes",
          "trust_emails",
          "callback_url",
          "callback_urls",
          "linked_users",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ConnectionsBody": {
        "additionalProperties": false,
        "properties": {
          "connections": {
            "items": {
              "$ref": "#/components/schemas/ConnectionOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "connections"
        ],
        "type": "object"
      },
      "CreateApplicationInBody": {
        "additionalProperties": false,
        "properties": {
          "consent_screen": {
            "type": "boolean"
          },
          "logout_uris": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "redirect_uris": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "refresh_tokens": {
            "description": "On unless set to false",
            "type": "boolean"
          },
          "type": {
            "enum": [
              "web",
              "spa",
              "native"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "type": "object"
      },
      "CreateConnectionInBody": {
        "additionalProperties": false,
        "properties": {
          "authorization_url": {
            "description": "OAuth 2.0 only",
            "maxLength": 500,
            "type": "string"
          },
          "claims": {
            "$ref": "#/components/schemas/ConnectionClaims",
            "description": "OAuth 2.0 only"
          },
          "client_id": {
            "maxLength": 500,
            "type": "string"
          },
          "client_secret": {
            "description": "Stored encrypted and never returned",
            "maxLength": 2000,
            "type": "string"
          },
          "discovery_url": {
            "description": "OpenID Connect only. The issuer URL or its /.well-known/openid-configuration address.",
            "maxLength": 500,
            "type": "string"
          },
          "enabled": {
            "description": "Turn it on right away",
            "type": "boolean"
          },
          "kind": {
            "enum": [
              "google",
              "github",
              "oidc",
              "oauth2"
            ],
            "type": "string"
          },
          "name": {
            "description": "Shown on the button. Defaults to Google or GitHub, and the others need one.",
            "maxLength": 64,
            "type": "string"
          },
          "scopes": {
            "description": "OpenID Connect and OAuth 2.0 only. OpenID Connect always asks for openid, email and profile.",
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "slug": {
            "description": "Ends the callback URL. Defaults to google or github, or to the name in lowercase.",
            "maxLength": 32,
            "type": "string"
          },
          "token_auth": {
            "description": "OAuth 2.0 only. How MicroAuth sends the client secret to the token endpoint: basic (HTTP Basic, the default) or post (in the form).",
            "enum": [
              "basic",
              "post"
            ],
            "type": "string"
          },
          "token_url": {
            "description": "OAuth 2.0 only",
            "maxLength": 500,
            "type": "string"
          },
          "trust_emails": {
            "description": "OpenID Connect and OAuth 2.0 only. Turn it on only for a provider that checks email addresses itself.",
            "type": "boolean"
          },
          "userinfo_url": {
            "description": "OAuth 2.0 only",
            "maxLength": 500,
            "type": "string"
          }
        },
        "required": [
          "kind",
          "client_id",
          "client_secret"
        ],
        "type": "object"
      },
      "CreatePermissionInBody": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 300,
            "type": "string"
          },
          "name": {
            "description": "Lowercase letters and digits with single : . _ or - between words, such as posts:read",
            "maxLength": 64,
            "type": "string"
          },
          "sensitive": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateResourceInBody": {
        "additionalProperties": false,
        "properties": {
          "identifier": {
            "description": "The API's or MCP server's URL, such as https://api.example.com or https://cms.example.com/mcp",
            "maxLength": 2000,
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "permissions": {
            "description": "Permission names",
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "identifier",
          "name"
        ],
        "type": "object"
      },
      "CreateServiceInBody": {
        "additionalProperties": false,
        "properties": {
          "api_base_url": {
            "description": "For an API, where it runs",
            "maxLength": 300,
            "type": "string"
          },
          "app_url": {
            "description": "For sign in, your app's address. Use https, or plain http on localhost while you develop.",
            "maxLength": 300,
            "type": "string"
          },
          "kind": {
            "description": "auth signs people in to your own apps, api sells or protects an API",
            "enum": [
              "auth",
              "api"
            ],
            "type": "string"
          },
          "mcp_server_url": {
            "description": "For sign in, the URL of an MCP server to register. It gets two new permissions named after the service, such as acme:read for every call and acme:write for tools that change things. Apps people connect are turned on when the plan includes them.",
            "maxLength": 2000,
            "type": "string"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "preset": {
            "default": "payg",
            "description": "For an API, where its settings start. payg and subscriptions turn billing on with open sign up. payg fills in a placeholder price, welcome credit and rps, marked with pricing_placeholder until you change or keep them. subscriptions turns plans on without any, for you to add. free turns billing off with open sign up and a monthly quota. internal turns billing off and makes sign up invite only. Change any of it later.",
            "enum": [
              "payg",
              "free",
              "subscriptions",
              "internal"
            ],
            "type": "string"
          },
          "slug": {
            "description": "Address, \u003cslug\u003e.microauth.dev. Generated from the name when empty.",
            "maxLength": 40,
            "type": "string"
          },
          "starter_app": {
            "description": "For sign in, add a web application for the starter code. Its redirect URIs are /auth/callback on the app's address and on http://localhost:8000. On unless set to false.",
            "type": "boolean"
          }
        },
        "required": [
          "kind",
          "name"
        ],
        "type": "object"
      },
      "CreatedCustomerKeyBody": {
        "additionalProperties": false,
        "properties": {
          "key": {
            "$ref": "#/components/schemas/CustomerKey"
          },
          "secret": {
            "description": "The full key. It is shown only once.",
            "type": "string"
          }
        },
        "required": [
          "key",
          "secret"
        ],
        "type": "object"
      },
      "CreatedServiceBody": {
        "additionalProperties": false,
        "properties": {
          "application": {
            "$ref": "#/components/schemas/ApplicationOut",
            "description": "The starter web application of a sign in service"
          },
          "client_secret": {
            "description": "The starter application's client secret. Shown only this once. You can make a new one on the application's page.",
            "type": "string"
          },
          "resource": {
            "$ref": "#/components/schemas/ResourceOut",
            "description": "The MCP server registered from mcp_server_url"
          },
          "secret": {
            "description": "SDK secret key of an API service. You can reveal it again from its Connect page.",
            "type": "string"
          },
          "service": {
            "$ref": "#/components/schemas/ServiceOut"
          }
        },
        "required": [
          "service"
        ],
        "type": "object"
      },
      "CreditBody": {
        "additionalProperties": false,
        "properties": {
          "applied": {
            "description": "False when this ref was already applied",
            "type": "boolean"
          },
          "balance_micro": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "applied",
          "balance_micro"
        ],
        "type": "object"
      },
      "CreditInBody": {
        "additionalProperties": false,
        "properties": {
          "amount_micro": {
            "description": "Positive adds credit, negative removes it. 1,000,000 is $1.",
            "format": "int64",
            "maximum": 100000000000,
            "minimum": -100000000000,
            "type": "integer"
          },
          "note": {
            "maxLength": 300,
            "minLength": 1,
            "type": "string"
          },
          "ref": {
            "description": "Your idempotency reference, for example an invoice number. A repeated ref is ignored.",
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "amount_micro",
          "note"
        ],
        "type": "object"
      },
      "CustomerDetail": {
        "additionalProperties": false,
        "properties": {
          "auto_recharge": {
            "$ref": "#/components/schemas/AutoRechargeOut"
          },
          "balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "custom": {
            "$ref": "#/components/schemas/LimitsBody"
          },
          "custom_limits": {
            "type": "boolean"
          },
          "effective": {
            "$ref": "#/components/schemas/Effective"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_test": {
            "type": "boolean"
          },
          "keys": {
            "items": {
              "$ref": "#/components/schemas/CustomerKey"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "low_balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/MemberSummary"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "month_requests": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "plan_id": {
            "type": "string"
          },
          "plan_name": {
            "type": "string"
          },
          "plan_source": {
            "enum": [
              "",
              "manual",
              "stripe"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "pending",
              "suspended"
            ],
            "type": "string"
          },
          "stripe_customer_id": {
            "type": "string"
          },
          "subscription_period_end": {
            "format": "date-time",
            "type": "string"
          },
          "subscription_status": {
            "type": "string"
          }
        },
        "required": [
          "notes",
          "plan_source",
          "effective",
          "custom",
          "auto_recharge",
          "members",
          "keys",
          "id",
          "name",
          "email",
          "status",
          "is_test",
          "balance_micro",
          "month_requests",
          "custom_limits",
          "created_at"
        ],
        "type": "object"
      },
      "CustomerExport": {
        "additionalProperties": false,
        "properties": {
          "activity": {
            "description": "Activity log entries about this customer or by its members",
            "items": {
              "$ref": "#/components/schemas/AuditOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "api": {
            "type": "string"
          },
          "customer": {
            "$ref": "#/components/schemas/ExportCustomer"
          },
          "exported_at": {
            "format": "date-time",
            "type": "string"
          },
          "invites": {
            "items": {
              "$ref": "#/components/schemas/TeamInvite"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "keys": {
            "items": {
              "$ref": "#/components/schemas/ExportKey"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "ledger": {
            "items": {
              "$ref": "#/components/schemas/LedgerEntry"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/ExportPortalMember"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "usage": {
            "description": "Requests by day for the last 400 days",
            "items": {
              "$ref": "#/components/schemas/DayStat"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "exported_at",
          "api",
          "customer",
          "members",
          "invites",
          "keys",
          "ledger",
          "usage",
          "activity"
        ],
        "type": "object"
      },
      "CustomerInviteOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "description": "When the invite was last sent",
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "created_at",
          "expires_at"
        ],
        "type": "object"
      },
      "CustomerInvitesBody": {
        "additionalProperties": false,
        "properties": {
          "invites": {
            "items": {
              "$ref": "#/components/schemas/CustomerInviteOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "invites"
        ],
        "type": "object"
      },
      "CustomerKey": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expired": {
            "description": "The key is past its expiry and no longer works. It stays listed until it's revoked.",
            "type": "boolean"
          },
          "expires_at": {
            "description": "When the key stops working. Empty for a key that never expires.",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "created_at",
          "expired"
        ],
        "type": "object"
      },
      "CustomerKeyInBody": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "description": "When the key stops working, up to three years ahead. Leave it out for a key that never expires.",
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "maxLength": 60,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CustomerSummary": {
        "additionalProperties": false,
        "properties": {
          "balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "custom_limits": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_test": {
            "type": "boolean"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "month_requests": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "plan_id": {
            "type": "string"
          },
          "plan_name": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "pending",
              "suspended"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "status",
          "is_test",
          "balance_micro",
          "month_requests",
          "custom_limits",
          "created_at"
        ],
        "type": "object"
      },
      "CustomersBody": {
        "additionalProperties": false,
        "properties": {
          "customers": {
            "items": {
              "$ref": "#/components/schemas/CustomerSummary"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "customers"
        ],
        "type": "object"
      },
      "DayStat": {
        "additionalProperties": false,
        "properties": {
          "billable": {
            "format": "int64",
            "type": "integer"
          },
          "charged_micro": {
            "format": "int64",
            "type": "integer"
          },
          "day": {
            "type": "string"
          },
          "errors": {
            "format": "int64",
            "type": "integer"
          },
          "requests": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "day",
          "requests",
          "billable",
          "errors",
          "charged_micro"
        ],
        "type": "object"
      },
      "DeleteMeInBody": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "description": "Authenticator or recovery code, needed when two step verification is on",
            "maxLength": 20,
            "type": "string"
          },
          "password": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "password"
        ],
        "type": "object"
      },
      "DeletionBody": {
        "additionalProperties": false,
        "properties": {
          "blocking": {
            "description": "Workspaces where you are the only owner that still have services or teammates. Make someone else an owner, or empty them, first.",
            "items": {
              "$ref": "#/components/schemas/AccountWorkspace"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "deleted": {
            "description": "Workspaces only you belong to. They are deleted with the account.",
            "items": {
              "$ref": "#/components/schemas/AccountWorkspace"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "left": {
            "description": "Shared workspaces the account leaves",
            "items": {
              "$ref": "#/components/schemas/AccountWorkspace"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "blocking",
          "deleted",
          "left"
        ],
        "type": "object"
      },
      "DomainInBody": {
        "additionalProperties": false,
        "properties": {
          "domain": {
            "maxLength": 253,
            "type": "string"
          }
        },
        "required": [
          "domain"
        ],
        "type": "object"
      },
      "DomainOut": {
        "additionalProperties": false,
        "properties": {
          "allowed": {
            "description": "The service's plan includes custom domains",
            "type": "boolean"
          },
          "checked_at": {
            "format": "date-time",
            "type": "string"
          },
          "cname_target": {
            "description": "Point the domain here with a CNAME record",
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "redirect": {
            "description": "Page visits on the microauth.dev address go on to the custom domain while it's live. Sign ins that apps start there still finish there.",
            "type": "boolean"
          },
          "status": {
            "enum": [
              "none",
              "pending",
              "verified",
              "active",
              "failed"
            ],
            "type": "string"
          },
          "txt_name": {
            "type": "string"
          },
          "txt_value": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "cname_target",
          "allowed",
          "redirect"
        ],
        "type": "object"
      },
      "DomainRedirectInBody": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "description": "Send page visits on the microauth.dev address to the custom domain",
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "Effective": {
        "additionalProperties": false,
        "properties": {
          "billing_model": {
            "enum": [
              "payg",
              "subscription",
              "none"
            ],
            "type": "string"
          },
          "monthly_quota": {
            "format": "int64",
            "type": "integer"
          },
          "price_per_request_micro": {
            "format": "int64",
            "type": "integer"
          },
          "rps": {
            "format": "int32",
            "type": "integer"
          },
          "source": {
            "enum": [
              "custom",
              "plan",
              "payg"
            ],
            "type": "string"
          }
        },
        "required": [
          "rps",
          "price_per_request_micro",
          "source",
          "billing_model"
        ],
        "type": "object"
      },
      "EmailChangeBody": {
        "additionalProperties": false,
        "properties": {
          "sent": {
            "type": "boolean"
          },
          "ticket": {
            "description": "Send this back with the code. It works for 30 minutes.",
            "type": "string"
          }
        },
        "required": [
          "sent",
          "ticket"
        ],
        "type": "object"
      },
      "EmailChangeInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "The new address. The code goes there.",
            "maxLength": 254,
            "type": "string"
          },
          "password": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "EmailDomainInBody": {
        "additionalProperties": false,
        "properties": {
          "domain": {
            "description": "Such as acme.com or mail.acme.com",
            "maxLength": 253,
            "type": "string"
          },
          "sender": {
            "description": "The part of the address before the @. Defaults to no-reply.",
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "domain"
        ],
        "type": "object"
      },
      "EmailDomainOut": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "description": "sender@domain",
            "type": "string"
          },
          "can_send": {
            "description": "Mailraft accepts email from the domain",
            "type": "boolean"
          },
          "checked_at": {
            "format": "date-time",
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "owned": {
            "type": "boolean"
          },
          "ownership": {
            "$ref": "#/components/schemas/OwnershipOut",
            "description": "The TXT record that proves this service owns the domain, when it needs one"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/EmailRecordOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "return_path": {
            "description": "The name in front of the domain for the return path CNAME, such as ma-bounces",
            "type": "string"
          },
          "return_path_editable": {
            "description": "This service can rename the return path: it owns the domain, or no other service uses it",
            "type": "boolean"
          },
          "sender": {
            "description": "The part of the address before the @",
            "type": "string"
          },
          "shared": {
            "description": "Other services send from this domain too",
            "type": "boolean"
          },
          "state": {
            "description": "pending: the DNS records aren't verified yet. ownership: the records are verified, and this service still has to prove it owns the domain. sending: emails come from address. paused: the domain is ready, but the plan doesn't include custom email domains. failed: the DKIM record went missing, so emails come from the default address until it's back.",
            "enum": [
              "pending",
              "ownership",
              "sending",
              "paused",
              "failed"
            ],
            "type": "string"
          },
          "status": {
            "description": "Mailraft's check of the DNS records. partially_verified can send, with the return path or DMARC record missing.",
            "enum": [
              "pending",
              "partially_verified",
              "verified",
              "failed"
            ],
            "type": "string"
          },
          "verified_at": {
            "description": "When the domain first passed DKIM",
            "format": "date-time",
            "type": "string"
          },
          "zone": {
            "description": "The DNS zone the records go in",
            "type": "string"
          }
        },
        "required": [
          "domain",
          "sender",
          "address",
          "state",
          "status",
          "can_send",
          "records",
          "owned",
          "shared",
          "return_path_editable"
        ],
        "type": "object"
      },
      "EmailInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Email address",
            "maxLength": 254,
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "EmailOut": {
        "additionalProperties": false,
        "properties": {
          "allowed": {
            "description": "The plan includes custom email domains",
            "type": "boolean"
          },
          "available": {
            "description": "Email domains can be added on this server right now",
            "type": "boolean"
          },
          "default_from": {
            "description": "Where emails come from without a ready domain of the service's own",
            "type": "string"
          },
          "domain": {
            "$ref": "#/components/schemas/EmailDomainOut"
          },
          "from": {
            "description": "The address the service's emails come from now",
            "type": "string"
          },
          "from_name": {
            "type": "string"
          },
          "reply_to": {
            "description": "Replies go to the service's support email",
            "type": "string"
          }
        },
        "required": [
          "allowed",
          "available",
          "from",
          "from_name",
          "default_from"
        ],
        "type": "object"
      },
      "EmailRecordOut": {
        "additionalProperties": false,
        "properties": {
          "chunks": {
            "description": "The value in strings of up to 255 characters, for DNS providers that ask for them",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "found": {
            "description": "What the last check found in DNS",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "host": {
            "description": "The full record name",
            "type": "string"
          },
          "key": {
            "description": "Mailraft's name for the record, such as dkim1 or dmarc",
            "type": "string"
          },
          "name": {
            "description": "The record name in the zone, @ for the zone itself",
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "status": {
            "description": "pass, fail, warn, pending or info",
            "type": "string"
          },
          "type": {
            "description": "TXT or CNAME",
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "type",
          "name",
          "host",
          "value",
          "status",
          "required"
        ],
        "type": "object"
      },
      "EmailReturnPathInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "The name in front of the domain, such as bounces",
            "maxLength": 253,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "EmailSenderInBody": {
        "additionalProperties": false,
        "properties": {
          "sender": {
            "description": "The part of the address before the @, such as hello or no-reply",
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "sender"
        ],
        "type": "object"
      },
      "EmailSettingsBody": {
        "additionalProperties": false,
        "properties": {
          "always": {
            "description": "The emails that always go out",
            "type": "string"
          },
          "receives": {
            "description": "False when your role gets none of these topics, like portal developers or dashboard editors and viewers",
            "type": "boolean"
          },
          "topics": {
            "description": "The topics your role gets",
            "items": {
              "$ref": "#/components/schemas/TopicSetting"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "topics",
          "always",
          "receives"
        ],
        "type": "object"
      },
      "EmailSettingsInBody": {
        "additionalProperties": false,
        "properties": {
          "topics": {
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Topics to turn on or off. Topics you leave out keep their setting.",
            "type": "object"
          }
        },
        "required": [
          "topics"
        ],
        "type": "object"
      },
      "EmailVerifyInBody": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "maxLength": 6,
            "minLength": 6,
            "type": "string"
          },
          "email": {
            "maxLength": 254,
            "type": "string"
          },
          "ticket": {
            "maxLength": 1000,
            "type": "string"
          }
        },
        "required": [
          "ticket",
          "email",
          "code"
        ],
        "type": "object"
      },
      "EraseCustomerInBody": {
        "additionalProperties": false,
        "properties": {
          "delete_stripe_customer": {
            "default": true,
            "description": "Also delete the customer in your connected Stripe account. Their past invoices stay in Stripe.",
            "type": "boolean"
          }
        },
        "required": [
          "delete_stripe_customer"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "additionalProperties": false,
        "properties": {
          "location": {
            "description": "Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'",
            "type": "string"
          },
          "message": {
            "description": "Error message text",
            "type": "string"
          },
          "value": {
            "description": "The value at the given location"
          }
        },
        "type": "object"
      },
      "ErrorModel": {
        "additionalProperties": false,
        "properties": {
          "detail": {
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "examples": [
              "Property foo is required but is missing."
            ],
            "type": "string"
          },
          "errors": {
            "description": "Optional list of individual error details",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "instance": {
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "examples": [
              "https://example.com/error-log/abc123"
            ],
            "format": "uri",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code",
            "examples": [
              400
            ],
            "format": "int64",
            "type": "integer"
          },
          "title": {
            "description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
            "examples": [
              "Bad Request"
            ],
            "type": "string"
          },
          "type": {
            "default": "about:blank",
            "description": "A URI reference to human-readable documentation for the error.",
            "examples": [
              "https://example.com/errors/example"
            ],
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExportCustomer": {
        "additionalProperties": false,
        "properties": {
          "balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "low_balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "saved_card": {
            "description": "The card automatic top ups charge",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "status_changed_at": {
            "format": "date-time",
            "type": "string"
          },
          "stripe_customer_id": {
            "type": "string"
          },
          "subscription_status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "balance_micro",
          "notes",
          "created_at",
          "status_changed_at"
        ],
        "type": "object"
      },
      "ExportInvite": {
        "additionalProperties": false,
        "properties": {
          "accepted_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "direction": {
            "enum": [
              "received",
              "sent"
            ],
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "workspace": {
            "type": "string"
          }
        },
        "required": [
          "workspace",
          "email",
          "role",
          "direction",
          "created_at",
          "expires_at",
          "accepted_at"
        ],
        "type": "object"
      },
      "ExportKey": {
        "additionalProperties": false,
        "properties": {
          "revoked_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExportMember": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "joined_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "joined_at"
        ],
        "type": "object"
      },
      "ExportPasskey": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "synced",
          "created_at"
        ],
        "type": "object"
      },
      "ExportPortalMember": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "docs_opened_at": {
            "description": "When they first opened the API docs from the portal",
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_login_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "passkeys": {
            "items": {
              "$ref": "#/components/schemas/ExportPasskey"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "picture": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "terms_accepted_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "two_step": {
            "description": "Two step verification is on",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "picture",
          "role",
          "two_step",
          "terms_accepted_at",
          "last_login_at",
          "created_at",
          "sessions",
          "passkeys"
        ],
        "type": "object"
      },
      "ExportProfile": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_admin": {
            "type": "boolean"
          },
          "last_login_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "picture": {
            "type": "string"
          },
          "recovery_codes_left": {
            "format": "int64",
            "type": "integer"
          },
          "two_factor": {
            "description": "Two step verification is on",
            "type": "boolean"
          },
          "two_step_since": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "picture",
          "two_factor",
          "recovery_codes_left",
          "is_admin",
          "last_login_at",
          "created_at"
        ],
        "type": "object"
      },
      "ExportTerms": {
        "additionalProperties": false,
        "properties": {
          "accepted_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "current_version": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "accepted_at",
          "current_version"
        ],
        "type": "object"
      },
      "FreeHolderOut": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "Empty when you can't open its workspace",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "owner_name": {
            "type": "string"
          },
          "yours": {
            "description": "It holds your own free allowance",
            "type": "boolean"
          }
        },
        "required": [
          "owner_name",
          "yours"
        ],
        "type": "object"
      },
      "FreeTierCheckBody": {
        "additionalProperties": false,
        "properties": {
          "holder": {
            "$ref": "#/components/schemas/FreeHolderOut"
          },
          "new_service_paused": {
            "description": "An owner of this workspace already has a Free service of the kind, so a new one starts paused until it has a paid plan",
            "type": "boolean"
          }
        },
        "required": [
          "new_service_paused"
        ],
        "type": "object"
      },
      "FreeTierOut": {
        "additionalProperties": false,
        "properties": {
          "carried_requests": {
            "description": "Requests this month from Free APIs its owners deleted, taken off its allowance",
            "format": "int64",
            "type": "integer"
          },
          "holder": {
            "$ref": "#/components/schemas/FreeHolderOut",
            "description": "The Free service of the same kind holding the allowance this one needs"
          },
          "paused_at": {
            "format": "date-time",
            "type": "string"
          },
          "pauses_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "description": "Each owner gets one Free service of each kind. A service that is over pauses at pauses_at unless it gets a paid plan.",
            "enum": [
              "ok",
              "over",
              "paused"
            ],
            "type": "string"
          }
        },
        "required": [
          "status",
          "carried_requests"
        ],
        "type": "object"
      },
      "GrantOut": {
        "additionalProperties": false,
        "properties": {
          "app_id": {
            "type": "string"
          },
          "app_kind": {
            "description": "owner for your own applications",
            "enum": [
              "owner",
              "registered",
              "metadata"
            ],
            "type": "string"
          },
          "app_name": {
            "type": "string"
          },
          "consented_at": {
            "description": "When the person last allowed the app, or null for your own applications that skip the consent screen",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "When the person first signed in to the app or allowed it",
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "description": "When the app last refreshed a token with this grant",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "scopes": {
            "description": "Everything the app can still do, including what refresh tokens from an earlier sign in still get",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "user_id": {
            "type": "string"
          },
          "user_name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "app_id",
          "app_name",
          "app_kind",
          "user_id",
          "email",
          "user_name",
          "scopes",
          "consented_at",
          "last_used_at",
          "created_at"
        ],
        "type": "object"
      },
      "GrantsBody": {
        "additionalProperties": false,
        "properties": {
          "grants": {
            "items": {
              "$ref": "#/components/schemas/GrantOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "grants"
        ],
        "type": "object"
      },
      "IncomingTransfer": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "from": {
            "description": "Who sent it",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "service",
              "workspace"
            ],
            "type": "string"
          },
          "name": {
            "description": "The service or workspace",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "from",
          "expires_at"
        ],
        "type": "object"
      },
      "InviteCustomerInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "maxLength": 254,
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "InviteInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "maxLength": 254,
            "type": "string"
          },
          "role": {
            "enum": [
              "admin",
              "editor",
              "viewer"
            ],
            "type": "string"
          }
        },
        "required": [
          "email",
          "role"
        ],
        "type": "object"
      },
      "InviteInfo": {
        "additionalProperties": false,
        "properties": {
          "account_exists": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "workspace": {
            "type": "string"
          }
        },
        "required": [
          "workspace",
          "email",
          "role",
          "account_exists",
          "expires_at"
        ],
        "type": "object"
      },
      "InviteOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "created_at",
          "expires_at"
        ],
        "type": "object"
      },
      "KeyInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "role": {
            "default": "editor",
            "enum": [
              "admin",
              "editor",
              "viewer"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "role"
        ],
        "type": "object"
      },
      "KeyOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "role",
          "created_at"
        ],
        "type": "object"
      },
      "KeyResourceOut": {
        "additionalProperties": false,
        "properties": {
          "identifier": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "identifier",
          "name"
        ],
        "type": "object"
      },
      "KeySettingsInBody": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "description": "Needs a MicroAuth plan that includes API keys",
            "type": "boolean"
          },
          "max_days": {
            "description": "The longest a key may last, in days. 0 lets keys never expire.",
            "format": "int32",
            "maximum": 3650,
            "minimum": 0,
            "type": "integer"
          },
          "prefix": {
            "description": "2 to 10 lowercase letters or digits, starting with a letter",
            "pattern": "^[a-z][a-z0-9]{1,9}$",
            "type": "string"
          },
          "sensitive_allowed": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "KeySettingsOut": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "description": "People can make API keys for their own accounts",
            "type": "boolean"
          },
          "max_days": {
            "description": "The longest a key may last, in days, or null to let keys never expire",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "plan_includes": {
            "description": "The service's MicroAuth plan includes API keys. Keys work only when it does.",
            "type": "boolean"
          },
          "prefix": {
            "description": "New keys start with this and an underscore",
            "type": "string"
          },
          "sensitive_allowed": {
            "description": "Sensitive permissions can go on keys",
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "prefix",
          "max_days",
          "sensitive_allowed",
          "plan_includes"
        ],
        "type": "object"
      },
      "LedgerBody": {
        "additionalProperties": false,
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/LedgerEntry"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "entries"
        ],
        "type": "object"
      },
      "LedgerEntry": {
        "additionalProperties": false,
        "properties": {
          "actor": {
            "type": "string"
          },
          "amount_micro": {
            "format": "int64",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "customer_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "requests": {
            "format": "int64",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "usage_day": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "customer_id",
          "kind",
          "amount_micro",
          "requests",
          "note",
          "actor",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "LimitsBody": {
        "additionalProperties": false,
        "properties": {
          "monthly_quota": {
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "price_per_request_micro": {
            "format": "int64",
            "maximum": 100000000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "rps": {
            "format": "int32",
            "maximum": 100000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "LoginBody": {
        "additionalProperties": false,
        "properties": {
          "challenge": {
            "description": "Send this with the authenticator code to /auth/login/2fa",
            "type": "string"
          },
          "passkey_available": {
            "description": "The account has a passkey, so /auth/login/2fa/passkey can finish signing in instead of a code",
            "type": "boolean"
          },
          "two_factor_required": {
            "type": "boolean"
          },
          "user": {
            "$ref": "#/components/schemas/UserOut"
          }
        },
        "required": [
          "two_factor_required"
        ],
        "type": "object"
      },
      "LoginInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "maxLength": 254,
            "type": "string"
          },
          "password": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "LogoBody": {
        "additionalProperties": false,
        "properties": {
          "logo_url": {
            "type": "string"
          }
        },
        "required": [
          "logo_url"
        ],
        "type": "object"
      },
      "McpCheckOut": {
        "additionalProperties": false,
        "properties": {
          "authorization_servers": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "metadata_url": {
            "description": "Where the metadata was found, or looked for first",
            "type": "string"
          },
          "ok": {
            "description": "The metadata is there and sends apps to this auth service for this resource",
            "type": "boolean"
          },
          "problems": {
            "description": "Each one stops apps from signing people in to the server",
            "items": {
              "$ref": "#/components/schemas/CheckNote"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "resource": {
            "description": "The resource the metadata names",
            "type": "string"
          },
          "scopes_supported": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "warnings": {
            "description": "Things apps may trip over, which don't stop them",
            "items": {
              "$ref": "#/components/schemas/CheckNote"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "ok",
          "metadata_url",
          "authorization_servers",
          "problems",
          "warnings"
        ],
        "type": "object"
      },
      "MeBody": {
        "additionalProperties": false,
        "properties": {
          "user": {
            "$ref": "#/components/schemas/UserOut"
          },
          "workspaces": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "user",
          "workspaces"
        ],
        "type": "object"
      },
      "MemberOut": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "joined_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "picture": {
            "description": "Their photo, or the default avatar they were given",
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "two_factor": {
            "type": "boolean"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "email",
          "name",
          "picture",
          "role",
          "two_factor",
          "joined_at"
        ],
        "type": "object"
      },
      "MemberSummary": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_login_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "passkeys": {
            "description": "How many passkeys the member has",
            "format": "int32",
            "type": "integer"
          },
          "role": {
            "type": "string"
          },
          "two_step": {
            "description": "Two step verification is on",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "role",
          "two_step",
          "passkeys",
          "created_at"
        ],
        "type": "object"
      },
      "MembersBody": {
        "additionalProperties": false,
        "properties": {
          "invites": {
            "items": {
              "$ref": "#/components/schemas/InviteOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/MemberOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "members",
          "invites"
        ],
        "type": "object"
      },
      "NameInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "NewKeyBody": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "description": "Shown once. Store it somewhere safe.",
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "id",
          "name",
          "prefix",
          "role",
          "created_at"
        ],
        "type": "object"
      },
      "OkBody": {
        "additionalProperties": false,
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "type": "object"
      },
      "OwnershipOut": {
        "additionalProperties": false,
        "properties": {
          "checked_at": {
            "format": "date-time",
            "type": "string"
          },
          "done": {
            "description": "This service proved it owns the domain",
            "type": "boolean"
          },
          "error": {
            "description": "What the last check found",
            "type": "string"
          },
          "host": {
            "description": "The full record name",
            "type": "string"
          },
          "name": {
            "description": "The record name in the zone",
            "type": "string"
          },
          "type": {
            "enum": [
              "TXT"
            ],
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "name",
          "host",
          "value",
          "done"
        ],
        "type": "object"
      },
      "PasskeyAnswerInBody": {
        "additionalProperties": false,
        "properties": {
          "ceremony": {
            "type": "string"
          },
          "credential": {
            "description": "The PublicKeyCredential from the browser, as JSON"
          }
        },
        "required": [
          "ceremony",
          "credential"
        ],
        "type": "object"
      },
      "PasskeyCreateInBody": {
        "additionalProperties": false,
        "properties": {
          "ceremony": {
            "description": "From /me/passkeys/begin",
            "type": "string"
          },
          "credential": {
            "description": "The PublicKeyCredential from the browser, as JSON"
          },
          "name": {
            "description": "Defaults to the passkey provider's name",
            "maxLength": 100,
            "type": "string"
          }
        },
        "required": [
          "ceremony",
          "credential"
        ],
        "type": "object"
      },
      "PasskeyOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credential_id": {
            "description": "The credential ID, base64url encoded, for the browser's signal methods",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "description": "Who made the passkey, such as iCloud Keychain or 1Password, when the authenticator says",
            "type": "string"
          },
          "rp_id": {
            "description": "The address the passkey works on",
            "type": "string"
          },
          "synced": {
            "description": "True when the passkey can sync to the person's other devices",
            "type": "boolean"
          },
          "this_address": {
            "description": "False for a portal passkey made on the portal's other address, which can't be used here",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "synced",
          "credential_id",
          "rp_id",
          "this_address",
          "created_at"
        ],
        "type": "object"
      },
      "PasskeyRenameInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "PasswordInBody": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "maxLength": 200,
            "type": "string"
          },
          "password": {
            "maxLength": 72,
            "minLength": 10,
            "type": "string"
          }
        },
        "required": [
          "current_password",
          "password"
        ],
        "type": "object"
      },
      "PendingTransfer": {
        "additionalProperties": false,
        "properties": {
          "transfer": {
            "$ref": "#/components/schemas/TransferOut",
            "description": "The transfer waiting to be accepted, if there is one"
          }
        },
        "type": "object"
      },
      "PeopleBody": {
        "additionalProperties": false,
        "properties": {
          "next_cursor": {
            "type": "string"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/PersonOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "users"
        ],
        "type": "object"
      },
      "PermissionOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "description": "Also the OAuth scope that asks for it, such as posts:read",
            "type": "string"
          },
          "sensitive": {
            "description": "Grants powerful access, so it should be called out when people are asked to allow it",
            "type": "boolean"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "sensitive",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "PermissionsBody": {
        "additionalProperties": false,
        "properties": {
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/PermissionOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "permissions"
        ],
        "type": "object"
      },
      "PersonDetail": {
        "additionalProperties": false,
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "sign_in_methods": {
            "$ref": "#/components/schemas/SignInMethods"
          }
        },
        "required": [
          "sign_in_methods",
          "sessions"
        ],
        "type": "object"
      },
      "PersonKeyOut": {
        "additionalProperties": false,
        "properties": {
          "last_used_at_server": {
            "$ref": "#/components/schemas/KeyResourceOut",
            "description": "The API or MCP server the key was last used at"
          }
        },
        "required": [
          "last_used_at_server"
        ],
        "type": "object"
      },
      "PersonKeysBody": {
        "additionalProperties": false,
        "properties": {
          "keys": {
            "items": {
              "$ref": "#/components/schemas/PersonKeyOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "keys"
        ],
        "type": "object"
      },
      "PersonOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "email_verified": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "last_login_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "picture": {
            "description": "Their photo, or the default avatar they were given",
            "type": "string"
          },
          "roles": {
            "items": {
              "$ref": "#/components/schemas/RoleRef"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "status": {
            "enum": [
              "active",
              "suspended"
            ],
            "type": "string"
          },
          "suspended_at": {
            "format": "date-time",
            "type": "string"
          },
          "two_step": {
            "description": "Two step verification is on",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "email_verified",
          "name",
          "picture",
          "status",
          "roles",
          "two_step",
          "last_login_at",
          "created_at"
        ],
        "type": "object"
      },
      "PersonRolesBody": {
        "additionalProperties": false,
        "properties": {
          "roles": {
            "items": {
              "$ref": "#/components/schemas/RoleRef"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "roles"
        ],
        "type": "object"
      },
      "PhotoBody": {
        "additionalProperties": false,
        "properties": {
          "picture": {
            "description": "The new photo, or the default avatar after removing one",
            "type": "string"
          }
        },
        "required": [
          "picture"
        ],
        "type": "object"
      },
      "PlanCheckoutInBody": {
        "additionalProperties": false,
        "properties": {
          "plan_code": {
            "maxLength": 32,
            "type": "string"
          }
        },
        "required": [
          "plan_code"
        ],
        "type": "object"
      },
      "PlanFields": {
        "additionalProperties": false,
        "properties": {
          "active": {
            "type": "boolean"
          },
          "credit_micro": {
            "format": "int64",
            "maximum": 100000000000,
            "minimum": 0,
            "type": "integer"
          },
          "description": {
            "maxLength": 300,
            "type": "string"
          },
          "monthly_quota": {
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "maxLength": 60,
            "minLength": 1,
            "type": "string"
          },
          "price_monthly_cents": {
            "format": "int32",
            "maximum": 1000000,
            "minimum": 0,
            "type": "integer"
          },
          "price_per_request_micro": {
            "format": "int64",
            "maximum": 100000000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "rps": {
            "format": "int32",
            "maximum": 100000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "sort": {
            "format": "int32",
            "maximum": 1000,
            "minimum": 0,
            "type": "integer"
          },
          "trial_days": {
            "description": "Days a new subscription runs free before the first payment. 0 means no trial. Only paid plans can have one.",
            "format": "int32",
            "maximum": 365,
            "minimum": 0,
            "type": "integer"
          },
          "visibility": {
            "default": "public",
            "enum": [
              "public",
              "private"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "price_monthly_cents"
        ],
        "type": "object"
      },
      "PlanOut": {
        "additionalProperties": false,
        "properties": {
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credit_micro": {
            "description": "Credit added on every paid invoice",
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "monthly_quota": {
            "description": "null uses the API default, 0 is unlimited",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "price_monthly_cents": {
            "format": "int32",
            "type": "integer"
          },
          "price_per_request_micro": {
            "description": "null uses the API default",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "rps": {
            "description": "null uses the API default, 0 is unlimited",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "sort": {
            "format": "int32",
            "type": "integer"
          },
          "stripe_price_id": {
            "type": "string"
          },
          "stripe_sync_error": {
            "type": "string"
          },
          "stripe_synced_at": {
            "format": "date-time",
            "type": "string"
          },
          "subscribers": {
            "format": "int64",
            "type": "integer"
          },
          "trial_days": {
            "description": "Days a new subscription runs free before the first payment, 0 for no trial. Each team and each card gets one trial of your plans.",
            "format": "int32",
            "type": "integer"
          },
          "visibility": {
            "enum": [
              "public",
              "private"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "price_monthly_cents",
          "trial_days",
          "credit_micro",
          "price_per_request_micro",
          "rps",
          "monthly_quota",
          "visibility",
          "active",
          "sort",
          "subscribers",
          "created_at"
        ],
        "type": "object"
      },
      "PlatformPlanOut": {
        "additionalProperties": false,
        "properties": {
          "api_keys": {
            "description": "People can make API keys for their own accounts. Auth plans only.",
            "type": "boolean"
          },
          "available": {
            "description": "False for a plan a service is on that can't be picked anymore",
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "custom_domain": {
            "type": "boolean"
          },
          "custom_email_domain": {
            "description": "Emails to the service's users come from its own verified domain",
            "type": "boolean"
          },
          "custom_sign_in": {
            "description": "Auth plans only",
            "type": "boolean"
          },
          "description": {
            "description": "One line about the plan, as on the pricing page",
            "type": "string"
          },
          "features": {
            "description": "Extra lines about the plan, after its limits and switches",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "kind": {
            "description": "The kind of service the plan is for",
            "enum": [
              "api",
              "auth"
            ],
            "type": "string"
          },
          "max_applications": {
            "description": "Auth plans only",
            "format": "int32",
            "type": "integer"
          },
          "max_customers": {
            "description": "API plans only",
            "format": "int32",
            "type": "integer"
          },
          "max_users": {
            "description": "Auth plans only",
            "format": "int32",
            "type": "integer"
          },
          "monthly_requests": {
            "description": "API plans only",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "price_monthly_cents": {
            "format": "int32",
            "type": "integer"
          },
          "private": {
            "description": "A custom plan offered only to chosen workspaces",
            "type": "boolean"
          },
          "purchasable": {
            "description": "True when checkout is available for this plan",
            "type": "boolean"
          },
          "remove_branding": {
            "type": "boolean"
          },
          "social_sign_in": {
            "description": "Auth plans only",
            "type": "boolean"
          },
          "teams": {
            "description": "Customer teams in the API's portal. API plans only.",
            "type": "boolean"
          },
          "third_party_apps": {
            "description": "Auth plans only",
            "type": "boolean"
          },
          "trial_days": {
            "description": "Days a new subscription runs free before the first payment, 0 for no trial. Each workspace and each card gets one MicroAuth trial.",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "code",
          "kind",
          "name",
          "price_monthly_cents",
          "trial_days",
          "monthly_requests",
          "max_customers",
          "custom_domain",
          "teams",
          "remove_branding",
          "custom_email_domain",
          "max_users",
          "max_applications",
          "social_sign_in",
          "custom_sign_in",
          "third_party_apps",
          "api_keys",
          "description",
          "features",
          "purchasable",
          "private",
          "available"
        ],
        "type": "object"
      },
      "ProfileInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "RecoveryBody": {
        "additionalProperties": false,
        "properties": {
          "recovery_codes": {
            "description": "Shown once. Each code signs in one time.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "recovery_codes"
        ],
        "type": "object"
      },
      "ResetBody": {
        "additionalProperties": false,
        "properties": {
          "signed_in": {
            "type": "boolean"
          },
          "user": {
            "$ref": "#/components/schemas/UserOut"
          }
        },
        "required": [
          "signed_in"
        ],
        "type": "object"
      },
      "ResetInBody": {
        "additionalProperties": false,
        "properties": {
          "password": {
            "maxLength": 72,
            "minLength": 10,
            "type": "string"
          },
          "ticket": {
            "description": "From /auth/password/verify",
            "maxLength": 1000,
            "type": "string"
          }
        },
        "required": [
          "ticket",
          "password"
        ],
        "type": "object"
      },
      "ResourceOut": {
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "description": "What the server sends as client_id to /oauth/introspect, once it has server credentials",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "identifier": {
            "description": "The canonical URL apps send as the resource parameter, and the aud of its access tokens",
            "type": "string"
          },
          "key_requests_per_minute": {
            "description": "Requests per minute for each person's API keys at this server, or null for no limit",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "description": "Names of the permissions it offers as scopes",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "previous_secret_expires_at": {
            "description": "When the secret replaced by the last rotation stops working",
            "format": "date-time",
            "type": "string"
          },
          "secret_hint": {
            "description": "The first characters of the current server secret",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "identifier",
          "name",
          "permissions",
          "key_requests_per_minute",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ResourcesBody": {
        "additionalProperties": false,
        "properties": {
          "resources": {
            "items": {
              "$ref": "#/components/schemas/ResourceOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "resources"
        ],
        "type": "object"
      },
      "RoleFields": {
        "additionalProperties": false,
        "properties": {
          "default": {
            "description": "Give the role to new people",
            "type": "boolean"
          },
          "description": {
            "maxLength": 300,
            "type": "string"
          },
          "name": {
            "maxLength": 64,
            "type": "string"
          },
          "permissions": {
            "description": "Permission names",
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "RoleInBody": {
        "additionalProperties": false,
        "properties": {
          "role": {
            "enum": [
              "owner",
              "admin",
              "editor",
              "viewer"
            ],
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "RoleOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "default": {
            "description": "New people get this role when they join",
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "people": {
            "description": "How many people have the role",
            "format": "int64",
            "type": "integer"
          },
          "permissions": {
            "description": "Names of the permissions the role grants",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "permissions",
          "default",
          "people",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "RoleRef": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "RolesBody": {
        "additionalProperties": false,
        "properties": {
          "roles": {
            "items": {
              "$ref": "#/components/schemas/RoleOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "roles"
        ],
        "type": "object"
      },
      "RotateInBody": {
        "additionalProperties": false,
        "properties": {
          "grace_hours": {
            "default": 24,
            "description": "How long the old secret keeps working",
            "format": "int64",
            "maximum": 168,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "grace_hours"
        ],
        "type": "object"
      },
      "SdkAllowance": {
        "additionalProperties": false,
        "properties": {
          "hard_cap": {
            "type": "boolean"
          },
          "limit": {
            "format": "int64",
            "type": "integer"
          },
          "period_end": {
            "format": "date-time",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "type": "string"
          },
          "remaining": {
            "format": "int64",
            "type": "integer"
          },
          "used": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "limit",
          "used",
          "remaining",
          "period_start",
          "period_end",
          "hard_cap"
        ],
        "type": "object"
      },
      "SdkBalance": {
        "additionalProperties": false,
        "properties": {
          "balance_seq": {
            "format": "int64",
            "type": "integer"
          },
          "credit_balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "credit_balance_micro",
          "balance_seq"
        ],
        "type": "object"
      },
      "SdkCustomer": {
        "additionalProperties": false,
        "properties": {
          "balance_seq": {
            "description": "Grows with every balance change. Compare it to order balance observations of one customer.",
            "format": "int64",
            "type": "integer"
          },
          "credit_balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "effective": {
            "$ref": "#/components/schemas/Effective"
          },
          "id": {
            "type": "string"
          },
          "month_requests": {
            "format": "int64",
            "type": "integer"
          },
          "policy_valid_until": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "pending",
              "suspended"
            ],
            "type": "string"
          },
          "usage_policy_id": {
            "description": "Send it back with usage so late reports are billed at this price",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "credit_balance_micro",
          "balance_seq",
          "month_requests",
          "effective",
          "usage_policy_id",
          "policy_valid_until"
        ],
        "type": "object"
      },
      "SdkKey": {
        "additionalProperties": false,
        "properties": {
          "customer_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key_hash": {
            "description": "Lowercase sha256 hex of the full API key",
            "type": "string"
          }
        },
        "required": [
          "id",
          "key_hash",
          "customer_id"
        ],
        "type": "object"
      },
      "SecondStepPasskeyInBody": {
        "additionalProperties": false,
        "properties": {
          "ceremony": {
            "description": "From /auth/login/2fa/passkey/begin",
            "type": "string"
          },
          "challenge": {
            "description": "From /auth/login",
            "maxLength": 1000,
            "type": "string"
          },
          "credential": {
            "description": "The PublicKeyCredential from the browser, as JSON"
          }
        },
        "required": [
          "challenge",
          "ceremony",
          "credential"
        ],
        "type": "object"
      },
      "SecretBody": {
        "additionalProperties": false,
        "properties": {
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "secret"
        ],
        "type": "object"
      },
      "SecurityBody": {
        "additionalProperties": false,
        "properties": {
          "confirm_with": {
            "description": "Ways to confirm it's you right now: passkey, code (authenticator or recovery code) and email",
            "items": {
              "enum": [
                "passkey",
                "code",
                "email"
              ],
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "confirmed_until": {
            "description": "Security changes need no new confirmation until then",
            "format": "date-time",
            "type": "string"
          },
          "passkeys": {
            "items": {
              "$ref": "#/components/schemas/PasskeyOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "recovery_codes_left": {
            "format": "int64",
            "type": "integer"
          },
          "rp_id": {
            "description": "The address new passkeys are made for",
            "type": "string"
          },
          "two_step": {
            "description": "Two step verification is on",
            "type": "boolean"
          },
          "two_step_since": {
            "format": "date-time",
            "type": "string"
          },
          "user_handle": {
            "description": "The passkey user ID, base64url encoded, for the browser's signal methods",
            "type": "string"
          }
        },
        "required": [
          "two_step",
          "recovery_codes_left",
          "passkeys",
          "confirm_with",
          "rp_id"
        ],
        "type": "object"
      },
      "SentBody": {
        "additionalProperties": false,
        "properties": {
          "sent": {
            "type": "boolean"
          }
        },
        "required": [
          "sent"
        ],
        "type": "object"
      },
      "ServerCredentialsBody": {
        "additionalProperties": false,
        "properties": {
          "client_secret": {
            "description": "Shown only this once",
            "type": "string"
          },
          "resource": {
            "$ref": "#/components/schemas/ResourceOut"
          }
        },
        "required": [
          "resource",
          "client_secret"
        ],
        "type": "object"
      },
      "ServiceOut": {
        "additionalProperties": false,
        "properties": {
          "accent_color": {
            "type": "string"
          },
          "access_token_minutes": {
            "description": "Auth services: how long access tokens last. Apps people connect get at most 10 minutes.",
            "format": "int32",
            "type": "integer"
          },
          "api_base_url": {
            "description": "Where your API runs, shown in the portal quickstart",
            "type": "string"
          },
          "app_url": {
            "description": "Auth services: your app, where people go once they're signed in",
            "type": "string"
          },
          "auto_recharge_allowed": {
            "type": "boolean"
          },
          "billable_status_codes": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "billing_enabled": {
            "description": "The API can charge its customers. With billing off nothing is charged, and there is no pay as you go, no plans and no Stripe. Only APIs use it.",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "docs_url": {
            "type": "string"
          },
          "domain": {
            "$ref": "#/components/schemas/DomainOut"
          },
          "email": {
            "$ref": "#/components/schemas/EmailOut",
            "description": "Where the service's emails to its users come from"
          },
          "example_path": {
            "description": "The path the portal's sample request calls on api_base_url, like /v1/items/42. Empty calls the base URL itself.",
            "type": "string"
          },
          "first_usage_at": {
            "format": "date-time",
            "type": "string"
          },
          "free_tier": {
            "$ref": "#/components/schemas/FreeTierOut",
            "description": "Set while the service is on the Free plan"
          },
          "id": {
            "type": "string"
          },
          "in_use": {
            "description": "Auth services: an app other than Try sign in, such as an app people connect, has got tokens, or someone has used an API key",
            "type": "boolean"
          },
          "issuer": {
            "description": "Auth services: the OpenID Connect issuer, which is the sign in address. The slug address stays a separate issuer once a custom domain is live.",
            "type": "string"
          },
          "key_header": {
            "description": "Header customers send their key in",
            "type": "string"
          },
          "kind": {
            "description": "Sign in for your own apps, or an API",
            "enum": [
              "auth",
              "api"
            ],
            "type": "string"
          },
          "lapsed_plan": {
            "description": "The paid plan whose payment failed, once its grace period is over and the service is on Free",
            "type": "string"
          },
          "logo_url": {
            "type": "string"
          },
          "low_balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "min_topup_cents": {
            "format": "int32",
            "type": "integer"
          },
          "monthly_quota": {
            "description": "Requests per month per customer, 0 for no limit",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "passkey_sign_in": {
            "description": "Auth services: people can sign in with a passkey",
            "type": "boolean"
          },
          "password_sign_in": {
            "description": "Auth services: people can sign in with a password",
            "type": "boolean"
          },
          "payg_enabled": {
            "description": "Customers can buy prepaid credit",
            "type": "boolean"
          },
          "plan": {
            "$ref": "#/components/schemas/PlatformPlanOut"
          },
          "plan_carried_until": {
            "description": "Set after a transfer: the previous owner paid for the plan until then, and the service moves to Free unless you pick a plan",
            "format": "date-time",
            "type": "string"
          },
          "plan_grace_until": {
            "format": "date-time",
            "type": "string"
          },
          "plan_period_end": {
            "format": "date-time",
            "type": "string"
          },
          "plan_status": {
            "enum": [
              "active",
              "past_due",
              "canceled"
            ],
            "type": "string"
          },
          "plan_trial_end": {
            "description": "Set during a free trial of the plan: the first payment is due then",
            "format": "date-time",
            "type": "string"
          },
          "plans_enabled": {
            "description": "Customers can subscribe to public plans",
            "type": "boolean"
          },
          "platform_limit": {
            "description": "Requests the API can send through MicroAuth this month. 0 for auth services.",
            "format": "int64",
            "type": "integer"
          },
          "portal_url": {
            "type": "string"
          },
          "previous_secret_valid_until": {
            "format": "date-time",
            "type": "string"
          },
          "price_per_request_micro": {
            "format": "int64",
            "type": "integer"
          },
          "pricing_placeholder": {
            "description": "The pay as you go price, welcome credit and rps are still the defaults MicroAuth filled in. Changing any of them, or sending false, clears it.",
            "type": "boolean"
          },
          "privacy_url": {
            "type": "string"
          },
          "role": {
            "description": "Your role in the service's workspace",
            "type": "string"
          },
          "rps": {
            "description": "Requests per second per customer, 0 for no limit",
            "format": "int32",
            "type": "integer"
          },
          "sdk_agent": {
            "type": "string"
          },
          "sdk_first_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "sdk_last_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "secret_prefix": {
            "description": "Start of the SDK secret key. Only API services have one.",
            "type": "string"
          },
          "session_days": {
            "description": "Auth services: people stay signed in to the hosted pages until they're away this many days",
            "format": "int32",
            "type": "integer"
          },
          "show_attribution": {
            "description": "The owner's choice to show Powered by MicroAuth on the portal and in its emails. It shows anyway on a plan that can't hide branding.",
            "type": "boolean"
          },
          "signup_mode": {
            "enum": [
              "open",
              "approval",
              "invite"
            ],
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "suspended"
            ],
            "type": "string"
          },
          "stripe": {
            "$ref": "#/components/schemas/StripeOut"
          },
          "support_email": {
            "type": "string"
          },
          "suspended_cause": {
            "description": "What MicroAuth told the team about the suspension. Missing for suspensions from before there was a choice of cause",
            "enum": [
              "billing",
              "abuse",
              "other"
            ],
            "type": "string"
          },
          "suspended_reason": {
            "description": "Why MicroAuth suspended the service. Only MicroAuth admins see it",
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "terms_url": {
            "type": "string"
          },
          "third_party_apps": {
            "description": "Auth services: apps made by other companies can ask your users to sign in",
            "type": "boolean"
          },
          "topup_amounts_cents": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "trial_available": {
            "description": "Picking a plan with trial_days starts a free trial: the workspace hasn't had one, and the service has no subscription",
            "type": "boolean"
          },
          "tried_sign_in_at": {
            "description": "Auth services: when a workspace member first finished Try sign in",
            "format": "date-time",
            "type": "string"
          },
          "website_url": {
            "type": "string"
          },
          "welcome_credit_micro": {
            "format": "int64",
            "type": "integer"
          },
          "workspace_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "kind",
          "slug",
          "name",
          "status",
          "portal_url",
          "tagline",
          "accent_color",
          "support_email",
          "website_url",
          "docs_url",
          "terms_url",
          "privacy_url",
          "show_attribution",
          "signup_mode",
          "api_base_url",
          "example_path",
          "key_header",
          "billing_enabled",
          "payg_enabled",
          "plans_enabled",
          "price_per_request_micro",
          "rps",
          "monthly_quota",
          "welcome_credit_micro",
          "billable_status_codes",
          "topup_amounts_cents",
          "min_topup_cents",
          "low_balance_micro",
          "auto_recharge_allowed",
          "pricing_placeholder",
          "app_url",
          "session_days",
          "access_token_minutes",
          "password_sign_in",
          "passkey_sign_in",
          "third_party_apps",
          "domain",
          "email",
          "plan",
          "plan_status",
          "trial_available",
          "platform_limit",
          "stripe",
          "role",
          "created_at"
        ],
        "type": "object"
      },
      "ServiceSummary": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "customers": {
            "format": "int64",
            "type": "integer"
          },
          "free_status": {
            "description": "Set while the service is on the Free plan",
            "enum": [
              "ok",
              "over",
              "paused"
            ],
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "auth",
              "api"
            ],
            "type": "string"
          },
          "logo_url": {
            "type": "string"
          },
          "month_requests": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "plan_code": {
            "type": "string"
          },
          "portal_url": {
            "type": "string"
          },
          "sdk_last_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "slug",
          "status",
          "portal_url",
          "plan_code",
          "customers",
          "month_requests",
          "created_at"
        ],
        "type": "object"
      },
      "ServiceTransferInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Email address of the new owner",
            "maxLength": 254,
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "SessionBody": {
        "additionalProperties": false,
        "properties": {
          "user": {
            "$ref": "#/components/schemas/UserOut"
          },
          "workspace_id": {
            "type": "string"
          }
        },
        "required": [
          "user"
        ],
        "type": "object"
      },
      "SessionOut": {
        "additionalProperties": false,
        "properties": {
          "amr": {
            "description": "Portal sessions: how they did, as RFC 8176 values such as pwd, otp, swk, hwk, user and mfa",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "auth_time": {
            "description": "Portal sessions: when the person last proved who they are, by signing in or confirming it's them",
            "format": "date-time",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "current": {
            "description": "The session making this request",
            "type": "boolean"
          },
          "device": {
            "description": "Browser and system, read from the user agent",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "provider": {
            "description": "Portal sessions: the provider's name, such as Google, when sign_in_method is external",
            "type": "string"
          },
          "sign_in_method": {
            "description": "How the session signed in: a password alone, a password and a second step, a passkey, a code sent by email, or another provider such as Google",
            "enum": [
              "password",
              "two_step",
              "passkey",
              "email",
              "external"
            ],
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "device",
          "user_agent",
          "ip",
          "sign_in_method",
          "created_at",
          "last_seen_at",
          "current"
        ],
        "type": "object"
      },
      "SessionsBody": {
        "additionalProperties": false,
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "sessions"
        ],
        "type": "object"
      },
      "SignInMethods": {
        "additionalProperties": false,
        "properties": {
          "passkeys": {
            "format": "int64",
            "type": "integer"
          },
          "password": {
            "description": "They have a password",
            "type": "boolean"
          },
          "providers": {
            "description": "Names of the outside providers they connected, such as Google",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "recovery_codes_left": {
            "format": "int64",
            "type": "integer"
          },
          "two_step": {
            "description": "An authenticator app is set up",
            "type": "boolean"
          }
        },
        "required": [
          "password",
          "two_step",
          "recovery_codes_left",
          "passkeys",
          "providers"
        ],
        "type": "object"
      },
      "SigningKeyOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "current": {
            "description": "New tokens are signed with it",
            "type": "boolean"
          },
          "kid": {
            "type": "string"
          },
          "published_until": {
            "description": "A retired key stays in JWKS until every token it signed has expired, plus a day",
            "format": "date-time",
            "type": "string"
          },
          "retired_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "kid",
          "current",
          "created_at"
        ],
        "type": "object"
      },
      "SigningKeysBody": {
        "additionalProperties": false,
        "properties": {
          "keys": {
            "items": {
              "$ref": "#/components/schemas/SigningKeyOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "keys"
        ],
        "type": "object"
      },
      "SignupInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "password": {
            "maxLength": 72,
            "minLength": 10,
            "type": "string"
          },
          "ticket": {
            "description": "From /auth/signup/verify",
            "maxLength": 1000,
            "type": "string"
          },
          "workspace": {
            "description": "Workspace name, usually your company. Defaults to your name.",
            "maxLength": 100,
            "type": "string"
          }
        },
        "required": [
          "ticket",
          "name",
          "password"
        ],
        "type": "object"
      },
      "SlugBody": {
        "additionalProperties": false,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "available"
        ],
        "type": "object"
      },
      "SnapshotBody": {
        "additionalProperties": false,
        "properties": {
          "billable_status_codes": {
            "description": "Responses with these status codes are charged. Report every status, since all of them count toward quotas.",
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "customers": {
            "items": {
              "$ref": "#/components/schemas/SdkCustomer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "generated_at": {
            "format": "date-time",
            "type": "string"
          },
          "keys": {
            "items": {
              "$ref": "#/components/schemas/SdkKey"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "platform_hard_cap": {
            "type": "boolean"
          },
          "platform_monthly_allowance": {
            "$ref": "#/components/schemas/SdkAllowance",
            "description": "The same numbers in the shape older SDKs read"
          },
          "platform_monthly_limit": {
            "format": "int64",
            "type": "integer"
          },
          "platform_monthly_remaining": {
            "format": "int64",
            "type": "integer"
          },
          "platform_monthly_used": {
            "format": "int64",
            "type": "integer"
          },
          "platform_period_end": {
            "format": "date-time",
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "tenant_name",
          "generated_at",
          "billable_status_codes",
          "platform_monthly_limit",
          "platform_monthly_used",
          "platform_monthly_remaining",
          "platform_period_end",
          "platform_hard_cap",
          "platform_monthly_allowance",
          "customers",
          "keys"
        ],
        "type": "object"
      },
      "StatsBody": {
        "additionalProperties": false,
        "properties": {
          "active_customers": {
            "description": "Customers with requests this month",
            "format": "int64",
            "type": "integer"
          },
          "charged_month_micro": {
            "description": "Usage charged to real customers this month",
            "format": "int64",
            "type": "integer"
          },
          "customers": {
            "format": "int64",
            "type": "integer"
          },
          "daily": {
            "description": "Requests include the test key; charged_micro does not",
            "items": {
              "$ref": "#/components/schemas/DayStat"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "pending_customers": {
            "format": "int64",
            "type": "integer"
          },
          "platform_limit": {
            "format": "int64",
            "type": "integer"
          },
          "requests_month": {
            "description": "All requests this month, the number your MicroAuth plan counts",
            "format": "int64",
            "type": "integer"
          },
          "requests_today": {
            "description": "All requests today, test key included",
            "format": "int64",
            "type": "integer"
          },
          "top_customers": {
            "description": "Busiest customers this month",
            "items": {
              "$ref": "#/components/schemas/TopCustomer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "topups_month_micro": {
            "description": "Credit bought with Stripe this month",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "requests_today",
          "requests_month",
          "charged_month_micro",
          "topups_month_micro",
          "customers",
          "active_customers",
          "pending_customers",
          "platform_limit",
          "daily",
          "top_customers"
        ],
        "type": "object"
      },
      "StripeOut": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "charges_enabled": {
            "type": "boolean"
          },
          "configured": {
            "description": "MicroAuth has Stripe Connect set up",
            "type": "boolean"
          },
          "connected": {
            "type": "boolean"
          },
          "connected_at": {
            "format": "date-time",
            "type": "string"
          },
          "livemode": {
            "type": "boolean"
          }
        },
        "required": [
          "configured",
          "connected",
          "livemode",
          "charges_enabled"
        ],
        "type": "object"
      },
      "TeamInvite": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "expires_at"
        ],
        "type": "object"
      },
      "TestKeyBody": {
        "additionalProperties": false,
        "properties": {
          "balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "customer_id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "key_header": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "customer_id",
          "balance_micro",
          "key_header"
        ],
        "type": "object"
      },
      "TicketBody": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "ticket": {
            "description": "Send this with the next step. It works once, for 30 minutes.",
            "type": "string"
          }
        },
        "required": [
          "ticket",
          "expires_at"
        ],
        "type": "object"
      },
      "TopCustomer": {
        "additionalProperties": false,
        "properties": {
          "balance_micro": {
            "format": "int64",
            "type": "integer"
          },
          "charged_micro": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "requests": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "requests",
          "charged_micro",
          "balance_micro"
        ],
        "type": "object"
      },
      "TopicSetting": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "label": {
            "type": "string"
          },
          "topic": {
            "type": "string"
          }
        },
        "required": [
          "topic",
          "label",
          "description",
          "enabled"
        ],
        "type": "object"
      },
      "TotpCodeInBody": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "maxLength": 20,
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "TotpDisableInBody": {
        "additionalProperties": false,
        "properties": {
          "password": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "password"
        ],
        "type": "object"
      },
      "TotpSetupBody": {
        "additionalProperties": false,
        "properties": {
          "secret": {
            "description": "Base32 secret for manual entry",
            "type": "string"
          },
          "uri": {
            "description": "otpauth:// link to show as a QR code",
            "type": "string"
          }
        },
        "required": [
          "secret",
          "uri"
        ],
        "type": "object"
      },
      "TransferAccepted": {
        "additionalProperties": false,
        "properties": {
          "service_id": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserOut"
          },
          "workspace_id": {
            "description": "Where the service or workspace is now",
            "type": "string"
          }
        },
        "required": [
          "user",
          "workspace_id"
        ],
        "type": "object"
      },
      "TransferInfo": {
        "additionalProperties": false,
        "properties": {
          "account_exists": {
            "type": "boolean"
          },
          "blocked": {
            "description": "Why the transfer can't be accepted right now",
            "type": "string"
          },
          "email": {
            "description": "The transfer is for whoever signs in with this email",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "from": {
            "description": "The sender's name",
            "type": "string"
          },
          "from_email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "service",
              "workspace"
            ],
            "type": "string"
          },
          "new_blocked": {
            "description": "Why the service can't move to a new workspace",
            "type": "string"
          },
          "places": {
            "description": "For a service, the workspaces you own that it can move to",
            "items": {
              "$ref": "#/components/schemas/TransferPlace"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "sender_stays": {
            "type": "boolean"
          },
          "services": {
            "description": "What moves",
            "items": {
              "$ref": "#/components/schemas/TransferServiceOut"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "signed_in": {
            "description": "You're signed in with the transfer's email",
            "type": "boolean"
          },
          "signed_in_as": {
            "description": "Set when you're signed in with another email",
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "accepted",
              "declined",
              "canceled",
              "expired"
            ],
            "type": "string"
          },
          "workspace": {
            "description": "The workspace it comes from",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "email",
          "from",
          "from_email",
          "workspace",
          "sender_stays",
          "expires_at",
          "services",
          "account_exists",
          "signed_in"
        ],
        "type": "object"
      },
      "TransferOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "description": "Who the transfer is for",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "service",
              "workspace"
            ],
            "type": "string"
          },
          "sender_stays": {
            "description": "In a workspace transfer, the sender stays on as an admin",
            "type": "boolean"
          },
          "status": {
            "enum": [
              "pending",
              "accepted",
              "declined",
              "canceled",
              "expired"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "email",
          "sender_stays",
          "status",
          "expires_at",
          "created_at"
        ],
        "type": "object"
      },
      "TransferPlace": {
        "additionalProperties": false,
        "properties": {
          "blocked": {
            "description": "Why the service can't move there",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "services": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "services"
        ],
        "type": "object"
      },
      "TransferServiceOut": {
        "additionalProperties": false,
        "properties": {
          "customers": {
            "format": "int64",
            "type": "integer"
          },
          "domain": {
            "description": "Custom portal domain",
            "type": "string"
          },
          "free": {
            "description": "On the Free plan. Each person can have one Free service of each kind across the workspaces they own.",
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "auth",
              "api"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "paid_until": {
            "description": "The sender pays for the plan until then. Pick a plan before that date to keep it.",
            "format": "date-time",
            "type": "string"
          },
          "plan": {
            "description": "Name of the service's MicroAuth plan",
            "type": "string"
          },
          "stripe": {
            "description": "Takes payments through the sender's Stripe account, which stays with them",
            "type": "boolean"
          },
          "subscribers": {
            "description": "Customers with a plan billed through the sender's Stripe account",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "plan",
          "free",
          "customers",
          "stripe",
          "subscribers"
        ],
        "type": "object"
      },
      "TryResultBody": {
        "additionalProperties": false,
        "properties": {
          "result": {
            "$ref": "#/components/schemas/TryResultOut",
            "description": "What an app got from the last try in this dashboard session, for 10 minutes after it. Left out when there's none."
          }
        },
        "type": "object"
      },
      "TryResultOut": {
        "additionalProperties": false,
        "properties": {
          "amr": {
            "description": "How they signed in, as RFC 8176 values such as pwd, otp, swk, hwk, mfa and fed",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "auth_time": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "email_verified": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "picture": {
            "type": "string"
          },
          "roles": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "name",
          "email",
          "email_verified",
          "roles",
          "permissions",
          "amr",
          "auth_time"
        ],
        "type": "object"
      },
      "TryStartInBody": {
        "additionalProperties": false,
        "properties": {
          "return_to": {
            "description": "The dashboard page to come back to, such as /services/{id}/applications. Anything that isn't a page of this service goes back to its overview.",
            "maxLength": 500,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TryStartOut": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "Send the browser here, to the authorization endpoint at the service's issuer",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_at"
        ],
        "type": "object"
      },
      "TwoFactorInBody": {
        "additionalProperties": false,
        "properties": {
          "challenge": {
            "type": "string"
          },
          "code": {
            "description": "Authenticator code or a recovery code",
            "maxLength": 20,
            "type": "string"
          }
        },
        "required": [
          "challenge",
          "code"
        ],
        "type": "object"
      },
      "UpdateApplicationInBody": {
        "additionalProperties": false,
        "properties": {
          "consent_screen": {
            "type": "boolean"
          },
          "logout_uris": {
            "description": "Replaces the list. Leave it out to keep it.",
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "redirect_uris": {
            "description": "Replaces the list. Leave it out to keep it.",
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "refresh_tokens": {
            "description": "Turning it off ends the app's refresh tokens",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UpdateConnectionInBody": {
        "additionalProperties": false,
        "properties": {
          "authorization_url": {
            "maxLength": 500,
            "type": "string"
          },
          "claims": {
            "$ref": "#/components/schemas/ConnectionClaims"
          },
          "client_id": {
            "maxLength": 500,
            "type": "string"
          },
          "client_secret": {
            "description": "Replaces the secret. Leave it out to keep the current one.",
            "maxLength": 2000,
            "type": "string"
          },
          "discovery_url": {
            "description": "Reads the discovery document again, even when the URL is the same",
            "maxLength": 500,
            "type": "string"
          },
          "name": {
            "maxLength": 64,
            "type": "string"
          },
          "scopes": {
            "description": "Replaces the scopes. Leave it out to keep them.",
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          },
          "token_auth": {
            "description": "OAuth 2.0 only",
            "enum": [
              "basic",
              "post"
            ],
            "type": "string"
          },
          "token_url": {
            "maxLength": 500,
            "type": "string"
          },
          "trust_emails": {
            "type": "boolean"
          },
          "userinfo_url": {
            "maxLength": 500,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateCustomerInBody": {
        "additionalProperties": false,
        "properties": {
          "low_balance_micro": {
            "description": "-1 uses the API default",
            "format": "int64",
            "minimum": -1,
            "type": "integer"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "notes": {
            "maxLength": 2000,
            "type": "string"
          },
          "plan_id": {
            "description": "Put the customer on a plan without Stripe. Send an empty string to remove the plan.",
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "suspended"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdatePermissionInBody": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 300,
            "type": "string"
          },
          "name": {
            "maxLength": 64,
            "type": "string"
          },
          "sensitive": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UpdateResourceInBody": {
        "additionalProperties": false,
        "properties": {
          "identifier": {
            "description": "Tokens issued for the old URL stop working at the new one",
            "maxLength": 2000,
            "type": "string"
          },
          "key_requests_per_minute": {
            "description": "Requests per minute for each person's API keys at this server. 0 removes the limit.",
            "format": "int32",
            "maximum": 1000000,
            "minimum": 0,
            "type": "integer"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "permissions": {
            "description": "Replaces the permissions it offers. Leave it out to keep them.",
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateRoleInBody": {
        "additionalProperties": false,
        "properties": {
          "default": {
            "type": "boolean"
          },
          "description": {
            "maxLength": 300,
            "type": "string"
          },
          "name": {
            "maxLength": 64,
            "type": "string"
          },
          "permissions": {
            "description": "Replaces the role's permissions. Leave it out to keep them.",
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateServiceInBody": {
        "additionalProperties": false,
        "properties": {
          "accent_color": {
            "maxLength": 7,
            "type": "string"
          },
          "access_token_minutes": {
            "format": "int32",
            "maximum": 1440,
            "minimum": 5,
            "type": "integer"
          },
          "api_base_url": {
            "maxLength": 300,
            "type": "string"
          },
          "app_url": {
            "description": "Use https, or plain http on localhost while you develop",
            "maxLength": 300,
            "type": "string"
          },
          "auto_recharge_allowed": {
            "type": "boolean"
          },
          "billable_status_codes": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "maxItems": 40,
            "type": "array"
          },
          "docs_url": {
            "maxLength": 300,
            "type": "string"
          },
          "example_path": {
            "description": "A path on api_base_url for the portal's sample request, like /v1/items/42?lang=en. The full address starting with api_base_url works too. Empty calls the base URL.",
            "maxLength": 300,
            "type": "string"
          },
          "key_header": {
            "maxLength": 40,
            "type": "string"
          },
          "low_balance_micro": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "min_topup_cents": {
            "format": "int32",
            "maximum": 100000,
            "minimum": 100,
            "type": "integer"
          },
          "monthly_quota": {
            "description": "0 removes the quota",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "name": {
            "maxLength": 80,
            "type": "string"
          },
          "passkey_sign_in": {
            "type": "boolean"
          },
          "password_sign_in": {
            "type": "boolean"
          },
          "payg_enabled": {
            "type": "boolean"
          },
          "plans_enabled": {
            "type": "boolean"
          },
          "price_per_request_micro": {
            "format": "int64",
            "maximum": 100000000,
            "minimum": 0,
            "type": "integer"
          },
          "pricing_placeholder": {
            "description": "false keeps the default pricing MicroAuth filled in as your own. true marks the pricing as those defaults, which needs billing on. Without it, changing the price, welcome credit or rps clears it.",
            "type": "boolean"
          },
          "privacy_url": {
            "maxLength": 300,
            "type": "string"
          },
          "rps": {
            "format": "int32",
            "maximum": 100000,
            "minimum": 0,
            "type": "integer"
          },
          "session_days": {
            "format": "int32",
            "maximum": 365,
            "minimum": 1,
            "type": "integer"
          },
          "show_attribution": {
            "description": "Powered by MicroAuth on the portal and in its emails. Turning it off needs a MicroAuth plan that can hide branding.",
            "type": "boolean"
          },
          "signup_mode": {
            "enum": [
              "open",
              "approval",
              "invite"
            ],
            "type": "string"
          },
          "slug": {
            "maxLength": 40,
            "type": "string"
          },
          "support_email": {
            "maxLength": 254,
            "type": "string"
          },
          "tagline": {
            "maxLength": 160,
            "type": "string"
          },
          "terms_url": {
            "maxLength": 300,
            "type": "string"
          },
          "third_party_apps": {
            "description": "Needs a MicroAuth plan that includes apps people connect",
            "type": "boolean"
          },
          "topup_amounts_cents": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "maxItems": 6,
            "type": "array"
          },
          "website_url": {
            "maxLength": 300,
            "type": "string"
          },
          "welcome_credit_micro": {
            "format": "int64",
            "maximum": 1000000000,
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "UrlBody": {
        "additionalProperties": false,
        "properties": {
          "changed": {
            "description": "True when the change already happened",
            "type": "boolean"
          },
          "url": {
            "description": "Send the browser here to finish in Stripe",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UsageBody": {
        "additionalProperties": false,
        "properties": {
          "accepted": {
            "description": "Items accepted by this call",
            "format": "int64",
            "type": "integer"
          },
          "customers": {
            "description": "Balances after this report for every customer with an accepted or duplicate item",
            "items": {
              "$ref": "#/components/schemas/SdkBalance"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/UsageResult"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "accepted",
          "results",
          "customers"
        ],
        "type": "object"
      },
      "UsageInBody": {
        "additionalProperties": true,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/UsageItem"
            },
            "maxItems": 1000,
            "minItems": 1,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "UsageItem": {
        "additionalProperties": true,
        "properties": {
          "api_key_id": {
            "description": "The key id from the snapshot",
            "type": "string"
          },
          "count": {
            "description": "Number of requests, 1 to 10,000,000",
            "format": "int64",
            "type": "integer"
          },
          "idempotency_key": {
            "description": "8 to 128 letters, digits, dots, underscores, colons or dashes. Keep it the same across retries.",
            "type": "string"
          },
          "key_id": {
            "description": "Older name for api_key_id",
            "type": "string"
          },
          "period_start": {
            "description": "When the request happened. Usage is grouped by UTC hour.",
            "format": "date-time",
            "type": "string"
          },
          "requests": {
            "description": "Older name for count",
            "format": "int64",
            "type": "integer"
          },
          "status_code": {
            "description": "The HTTP status your API answered with",
            "format": "int64",
            "type": "integer"
          },
          "usage_policy_id": {
            "description": "usage_policy_id from the snapshot that admitted the request",
            "type": "string"
          }
        },
        "required": [
          "idempotency_key",
          "status_code",
          "period_start"
        ],
        "type": "object"
      },
      "UsageResult": {
        "additionalProperties": false,
        "properties": {
          "charged_micro": {
            "description": "What the item charged the customer, in micro-USD. For a duplicate it is the original charge. Set on accepted and duplicate items.",
            "format": "int64",
            "type": "integer"
          },
          "customer_id": {
            "description": "The customer the item was recorded for. Set on accepted and duplicate items.",
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "http_status": {
            "format": "int64",
            "type": "integer"
          },
          "idempotency_key": {
            "type": "string"
          },
          "recorded_at": {
            "description": "When MicroAuth first recorded the item. Set on accepted and duplicate items.",
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "accepted",
              "duplicate",
              "rejected",
              "retry"
            ],
            "type": "string"
          }
        },
        "required": [
          "idempotency_key",
          "status"
        ],
        "type": "object"
      },
      "UserInviteInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "maxLength": 254,
            "type": "string"
          },
          "roles": {
            "description": "IDs of the roles they get on joining, as well as the default roles",
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "UserInviteOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invited_by": {
            "description": "Who sent it. Empty once they deleted their account.",
            "type": "string"
          },
          "roles": {
            "items": {
              "$ref": "#/components/schemas/RoleRef"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "email",
          "roles",
          "created_at",
          "expires_at"
        ],
        "type": "object"
      },
      "UserInvitesBody": {
        "additionalProperties": false,
        "properties": {
          "invites": {
            "items": {
              "$ref": "#/components/schemas/UserInviteOut"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "invites"
        ],
        "type": "object"
      },
      "UserOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_admin": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "picture": {
            "description": "Their photo, or the default avatar they were given",
            "type": "string"
          },
          "terms_accepted_at": {
            "format": "date-time",
            "type": "string"
          },
          "terms_current": {
            "description": "False when the Terms changed after this person last accepted them",
            "type": "boolean"
          },
          "two_factor": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "picture",
          "is_admin",
          "two_factor",
          "terms_current",
          "created_at"
        ],
        "type": "object"
      },
      "VerifyBody": {
        "additionalProperties": false,
        "properties": {
          "billable_status_codes": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/SdkCustomer"
          },
          "key_id": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "valid"
        ],
        "type": "object"
      },
      "WorkspaceOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "service_count": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "service_count",
          "created_at"
        ],
        "type": "object"
      },
      "WorkspaceTransferInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Email address of the new owner",
            "maxLength": 254,
            "type": "string"
          },
          "stay": {
            "description": "Stay on as an admin instead of leaving the workspace",
            "type": "boolean"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "WsNameInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "description": "Workspace API key (mak_...). Create one under Settings, API keys.",
        "scheme": "bearer",
        "type": "http"
      },
      "sdk": {
        "description": "SDK secret key (mas_...) from the API's Connect page.",
        "scheme": "bearer",
        "type": "http"
      },
      "session": {
        "description": "Browser session from signing in to the dashboard.",
        "in": "cookie",
        "name": "__Host-ma_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "MicroAuth turns an API into a product: developer sign up, API keys, prepaid credit, plans and Stripe payments.\n\nUse a workspace API key as a bearer token to automate everything the dashboard does. The SDK endpoints under /sdk/v1 are called by the MicroAuth SDKs, or by your own integration, with the SDK secret key and are served from https://api.microauth.com.\n\nRequests are limited to 20 per second per client network. Errors use application/problem+json.",
    "title": "MicroAuth API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/auth/invites/{token}": {
      "get": {
        "operationId": "get-auth-invites-token",
        "parameters": [
          {
            "description": "Token from the invite link",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "description": "Token from the invite link",
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteInfo"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Look up a workspace invite",
        "tags": [
          "Auth"
        ],
        "x-order": 14
      }
    },
    "/api/v1/auth/invites/{token}/accept": {
      "post": {
        "operationId": "post-auth-invites-token-accept",
        "parameters": [
          {
            "description": "Token from the invite link",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "description": "Token from the invite link",
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInviteInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Accept a workspace invite",
        "tags": [
          "Auth"
        ],
        "x-order": 15
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "operationId": "post-auth-login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Sign in",
        "tags": [
          "Auth"
        ],
        "x-order": 4
      }
    },
    "/api/v1/auth/login/2fa": {
      "post": {
        "operationId": "post-auth-login-2fa",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Finish signing in with two step verification",
        "tags": [
          "Auth"
        ],
        "x-order": 5
      }
    },
    "/api/v1/auth/login/2fa/passkey": {
      "post": {
        "operationId": "post-auth-login-2fa-passkey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecondStepPasskeyInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Finish signing in with a passkey instead of a code",
        "tags": [
          "Auth"
        ],
        "x-order": 9
      }
    },
    "/api/v1/auth/login/2fa/passkey/begin": {
      "post": {
        "description": "For the second step of a password sign in. Only the account's own passkeys are allowed.",
        "operationId": "post-auth-login-2fa-passkey-begin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChallengeInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CeremonyBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Start using a passkey instead of a code",
        "tags": [
          "Auth"
        ],
        "x-order": 8
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "post-auth-logout",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Sign out",
        "tags": [
          "Auth"
        ],
        "x-order": 10
      }
    },
    "/api/v1/auth/passkey/begin": {
      "post": {
        "description": "Returns options for navigator.credentials.get() with no allowed credentials, so the browser offers any passkey it has for this site.",
        "operationId": "post-auth-passkey-begin",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CeremonyBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Start signing in with a passkey",
        "tags": [
          "Auth"
        ],
        "x-order": 6
      }
    },
    "/api/v1/auth/passkey/finish": {
      "post": {
        "description": "A passkey checks the person with their device, so no code step follows even when two step verification is on.",
        "operationId": "post-auth-passkey-finish",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyAnswerInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Sign in with a passkey",
        "tags": [
          "Auth"
        ],
        "x-order": 7
      }
    },
    "/api/v1/auth/password/forgot": {
      "post": {
        "description": "The response is the same whether or not the email has an account. An address can get 3 codes every 15 minutes and 10 codes a day. After that the answer is 429 with reason code_limit and Retry-After, the seconds until another code can go out.",
        "operationId": "post-auth-password-forgot",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentBody"
                }
              }
            },
            "description": "Accepted"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Send a password reset code",
        "tags": [
          "Auth"
        ],
        "x-order": 11
      }
    },
    "/api/v1/auth/password/reset": {
      "post": {
        "operationId": "post-auth-password-reset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Reset the password",
        "tags": [
          "Auth"
        ],
        "x-order": 13
      }
    },
    "/api/v1/auth/password/verify": {
      "post": {
        "description": "Uses up the code and returns a ticket for /auth/password/reset.",
        "operationId": "post-auth-password-verify",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Check a password reset code",
        "tags": [
          "Auth"
        ],
        "x-order": 12
      }
    },
    "/api/v1/auth/signup": {
      "post": {
        "description": "Emails a 6 digit code. Check it with /auth/signup/verify. The response is the same whether or not the email already has an account. An address can get 3 codes every 15 minutes and 10 codes a day. After that the answer is 429 with reason code_limit and Retry-After, the seconds until another code can go out.",
        "operationId": "post-auth-signup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentBody"
                }
              }
            },
            "description": "Accepted"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Send a sign up code",
        "tags": [
          "Auth"
        ],
        "x-order": 1
      }
    },
    "/api/v1/auth/signup/complete": {
      "post": {
        "operationId": "post-auth-signup-complete",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Create the account",
        "tags": [
          "Auth"
        ],
        "x-order": 3
      }
    },
    "/api/v1/auth/signup/verify": {
      "post": {
        "description": "Uses up the code and returns a ticket for /auth/signup/complete. An email that already has an account never gets a code, so it fails like a wrong code.",
        "operationId": "post-auth-signup-verify",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Check a sign up code",
        "tags": [
          "Auth"
        ],
        "x-order": 2
      }
    },
    "/api/v1/me": {
      "delete": {
        "description": "Needs your password, and a code when two step verification is on. Refused with 409 while you are the only owner of a workspace that has services or teammates.",
        "operationId": "delete-me",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteMeInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete your account",
        "tags": [
          "Account"
        ],
        "x-order": 34
      },
      "get": {
        "operationId": "get-me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Current user and workspaces",
        "tags": [
          "Account"
        ],
        "x-order": 16
      },
      "patch": {
        "operationId": "patch-me",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Update your profile",
        "tags": [
          "Account"
        ],
        "x-order": 17
      }
    },
    "/api/v1/me/2fa/disable": {
      "post": {
        "description": "Needs a recent confirmation and the password.",
        "operationId": "post-me-2fa-disable",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpDisableInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Turn off two step verification",
        "tags": [
          "Account"
        ],
        "x-order": 29
      }
    },
    "/api/v1/me/2fa/enable": {
      "post": {
        "description": "Needs a recent confirmation and a current code from the authenticator app. Returns 10 recovery codes, shown once.",
        "operationId": "post-me-2fa-enable",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpCodeInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecoveryBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Turn on two step verification",
        "tags": [
          "Account"
        ],
        "x-order": 28
      }
    },
    "/api/v1/me/2fa/recovery-codes": {
      "post": {
        "description": "Needs a recent confirmation. The old codes stop working.",
        "operationId": "post-me-2fa-recovery-codes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecoveryBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Replace recovery codes",
        "tags": [
          "Account"
        ],
        "x-order": 30
      }
    },
    "/api/v1/me/2fa/setup": {
      "post": {
        "description": "Needs a recent confirmation. Returns a new secret to add to an authenticator app.",
        "operationId": "post-me-2fa-setup",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TotpSetupBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Start two step verification setup",
        "tags": [
          "Account"
        ],
        "x-order": 27
      }
    },
    "/api/v1/me/confirm": {
      "post": {
        "description": "Adding or removing a passkey and changing two step verification need a confirmation from the last 10 minutes. Without one they answer 403 with reason confirm_required.",
        "operationId": "post-me-confirm",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Confirm it's you",
        "tags": [
          "Account"
        ],
        "x-order": 22
      }
    },
    "/api/v1/me/confirm/begin": {
      "post": {
        "operationId": "post-me-confirm-begin",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CeremonyBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Start confirming it's you with a passkey",
        "tags": [
          "Account"
        ],
        "x-order": 20
      }
    },
    "/api/v1/me/confirm/email": {
      "post": {
        "description": "Only while two step verification is off. With it on, confirm with an authenticator code, a recovery code or a passkey. An address can get 3 codes every 15 minutes and 10 codes a day. After that the answer is 429 with reason code_limit and Retry-After, the seconds until another code can go out.",
        "operationId": "post-me-confirm-email",
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentBody"
                }
              }
            },
            "description": "Accepted"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Email a code to confirm it's you",
        "tags": [
          "Account"
        ],
        "x-order": 21
      }
    },
    "/api/v1/me/deletion": {
      "get": {
        "operationId": "get-me-deletion",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Check what deleting your account removes",
        "tags": [
          "Account"
        ],
        "x-order": 33
      }
    },
    "/api/v1/me/email": {
      "post": {
        "description": "Emails a code to the new address. The answer is the same whether or not that address already has an account. An address can get 3 codes every 15 minutes and 10 codes a day. After that the answer is 429 with reason code_limit and Retry-After, the seconds until another code can go out.",
        "operationId": "post-me-email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailChangeInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailChangeBody"
                }
              }
            },
            "description": "Accepted"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Start changing your email",
        "tags": [
          "Account"
        ],
        "x-order": 36
      }
    },
    "/api/v1/me/email/verify": {
      "post": {
        "operationId": "post-me-email-verify",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailVerifyInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Confirm your new email",
        "tags": [
          "Account"
        ],
        "x-order": 37
      }
    },
    "/api/v1/me/export": {
      "get": {
        "description": "Your profile, sessions, memberships, invites, Terms acceptance and the activity you performed, as one JSON file.",
        "operationId": "get-me-export",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountExport"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Download your data",
        "tags": [
          "Account"
        ],
        "x-order": 35
      }
    },
    "/api/v1/me/notifications": {
      "get": {
        "operationId": "get-me-notifications",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailSettingsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Your email settings",
        "tags": [
          "Account"
        ],
        "x-order": 42
      },
      "patch": {
        "description": "Workspace emails go to owners and admins. Your settings apply to every workspace you manage.",
        "operationId": "patch-me-notifications",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSettingsInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailSettingsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change your email settings",
        "tags": [
          "Account"
        ],
        "x-order": 43
      }
    },
    "/api/v1/me/passkeys": {
      "post": {
        "operationId": "post-me-passkeys",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyCreateInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Add a passkey",
        "tags": [
          "Account"
        ],
        "x-order": 24
      }
    },
    "/api/v1/me/passkeys/begin": {
      "post": {
        "description": "Needs a recent confirmation. Returns options for navigator.credentials.create().",
        "operationId": "post-me-passkeys-begin",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CeremonyBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Start adding a passkey",
        "tags": [
          "Account"
        ],
        "x-order": 23
      }
    },
    "/api/v1/me/passkeys/{passkey}": {
      "delete": {
        "description": "Needs a recent confirmation. On the hosted pages, a passkey that is the only way left to sign in gets 409 until another way is added.",
        "operationId": "delete-me-passkeys-passkey",
        "parameters": [
          {
            "description": "Passkey ID",
            "in": "path",
            "name": "passkey",
            "required": true,
            "schema": {
              "description": "Passkey ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Remove a passkey",
        "tags": [
          "Account"
        ],
        "x-order": 26
      },
      "patch": {
        "operationId": "patch-me-passkeys-passkey",
        "parameters": [
          {
            "description": "Passkey ID",
            "in": "path",
            "name": "passkey",
            "required": true,
            "schema": {
              "description": "Passkey ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyRenameInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Rename a passkey",
        "tags": [
          "Account"
        ],
        "x-order": 25
      }
    },
    "/api/v1/me/password": {
      "post": {
        "operationId": "post-me-password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change your password",
        "tags": [
          "Account"
        ],
        "x-order": 18
      }
    },
    "/api/v1/me/photo": {
      "delete": {
        "description": "You go back to your default avatar.",
        "operationId": "delete-me-photo",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Remove your photo",
        "tags": [
          "Account"
        ],
        "x-order": 32
      },
      "put": {
        "description": "Send a PNG, JPEG or WebP image up to 5 MB as the raw request body, with Content-Type image/png, image/jpeg or image/webp. It's cropped to a square, stripped of metadata and saved as a 256 pixel JPEG. Up to 20 uploads a day.",
        "operationId": "put-me-photo",
        "requestBody": {
          "content": {
            "image/jpeg": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            },
            "image/png": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            },
            "image/webp": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Upload your photo",
        "tags": [
          "Account"
        ],
        "x-order": 31
      }
    },
    "/api/v1/me/security": {
      "get": {
        "operationId": "get-me-security",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Your sign in and security settings",
        "tags": [
          "Account"
        ],
        "x-order": 19
      }
    },
    "/api/v1/me/sessions": {
      "delete": {
        "operationId": "delete-me-sessions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Sign out everywhere else",
        "tags": [
          "Account"
        ],
        "x-order": 40
      },
      "get": {
        "operationId": "get-me-sessions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "List your sessions",
        "tags": [
          "Account"
        ],
        "x-order": 39
      }
    },
    "/api/v1/me/sessions/{session}": {
      "delete": {
        "operationId": "delete-me-sessions-session",
        "parameters": [
          {
            "in": "path",
            "name": "session",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Sign out one session",
        "tags": [
          "Account"
        ],
        "x-order": 41
      }
    },
    "/api/v1/me/terms": {
      "post": {
        "operationId": "post-me-terms",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Accept the current Terms",
        "tags": [
          "Account"
        ],
        "x-order": 38
      }
    },
    "/api/v1/me/transfers": {
      "get": {
        "operationId": "get-me-transfers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/IncomingTransfer"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Transfers waiting for you",
        "tags": [
          "Transfers"
        ],
        "x-order": 150
      }
    },
    "/api/v1/platform-plans": {
      "get": {
        "description": "The public plans, for one kind of service or for both.",
        "operationId": "get-platform-plans",
        "parameters": [
          {
            "description": "Only plans for this kind of service",
            "explode": false,
            "in": "query",
            "name": "kind",
            "schema": {
              "description": "Only plans for this kind of service",
              "enum": [
                "api",
                "auth"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PlatformPlanOut"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "MicroAuth plans",
        "tags": [
          "MicroAuth plan"
        ],
        "x-order": 181
      }
    },
    "/api/v1/services/{id}": {
      "delete": {
        "operationId": "delete-services-id",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete a service",
        "tags": [
          "Services"
        ],
        "x-order": 64
      },
      "get": {
        "operationId": "get-services-id",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get a service",
        "tags": [
          "Services"
        ],
        "x-order": 61
      },
      "patch": {
        "description": "An auth service ignores the settings only APIs have, like pricing, rate limits and the key header, and an API service ignores the sign in settings of auth services. Auth services are open or invite only, and keep password or passkey sign in on.",
        "operationId": "patch-services-id",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateServiceInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Update a service's settings",
        "tags": [
          "Services"
        ],
        "x-order": 62
      }
    },
    "/api/v1/services/{id}/api-key-settings": {
      "get": {
        "description": "Whether people can make API keys for their own accounts, and the rules for new keys. Auth services only.",
        "operationId": "get-services-id-api-key-settings",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeySettingsOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get the API key settings",
        "tags": [
          "API keys for your users"
        ],
        "x-order": 98
      },
      "patch": {
        "description": "Turning keys off stops every key from working without deleting it. A new prefix or maximum applies to keys made from now on.",
        "operationId": "patch-services-id-api-key-settings",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeySettingsInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeySettingsOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Change the API key settings",
        "tags": [
          "API keys for your users"
        ],
        "x-order": 99
      }
    },
    "/api/v1/services/{id}/applications": {
      "get": {
        "description": "The apps people sign in to with this auth service.",
        "operationId": "get-services-id-applications",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List applications",
        "tags": [
          "Applications"
        ],
        "x-order": 84
      },
      "post": {
        "description": "Web apps get a client secret, returned only in this answer. The plan sets how many applications a service can have, up to 100. Each app can have up to 20 redirect URIs and as many sign out URIs.",
        "operationId": "post-services-id-applications",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApplicationInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationSecretBody"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Add an application",
        "tags": [
          "Applications"
        ],
        "x-order": 85
      }
    },
    "/api/v1/services/{id}/applications/{app}": {
      "delete": {
        "description": "Its refresh tokens stop working at once. Access tokens already issued last until they expire.",
        "operationId": "delete-services-id-applications-app",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Application ID",
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "description": "Application ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete an application",
        "tags": [
          "Applications"
        ],
        "x-order": 88
      },
      "get": {
        "operationId": "get-services-id-applications-app",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Application ID",
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "description": "Application ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get an application",
        "tags": [
          "Applications"
        ],
        "x-order": 86
      },
      "patch": {
        "description": "The type can't change. Redirect URIs must match exactly, and plain http only works on localhost, 127.0.0.1 and [::1].",
        "operationId": "patch-services-id-applications-app",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Application ID",
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "description": "Application ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApplicationInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Change an application",
        "tags": [
          "Applications"
        ],
        "x-order": 87
      }
    },
    "/api/v1/services/{id}/applications/{app}/secret/rotate": {
      "post": {
        "description": "Web apps only. Returns the new secret once. The secret it replaces keeps working for 24 hours, and any older one stops at once.",
        "operationId": "post-services-id-applications-app-secret-rotate",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Application ID",
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "description": "Application ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationSecretBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Rotate a client secret",
        "tags": [
          "Applications"
        ],
        "x-order": 89
      }
    },
    "/api/v1/services/{id}/billing": {
      "put": {
        "description": "With billing off an API charges nobody: pay as you go and plans turn off, and Stripe can't be connected. It can be turned off once Stripe is disconnected, no customer pays for a plan through Stripe, and no paid plan is active or has customers. Turning it on leaves pay as you go and plans off until you turn them on. Sign up doesn't change either way.",
        "operationId": "put-services-id-billing",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Turn billing on or off",
        "tags": [
          "Services"
        ],
        "x-order": 63
      }
    },
    "/api/v1/services/{id}/connected-apps": {
      "get": {
        "description": "Apps that registered themselves or sign people in with a client ID metadata document, newest first. Your own applications aren't listed.",
        "operationId": "get-services-id-connected-apps",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "next_cursor from the previous page",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "next_cursor from the previous page",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectedAppsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List connected apps",
        "tags": [
          "Connected apps"
        ],
        "x-order": 137
      }
    },
    "/api/v1/services/{id}/connected-apps/{app}": {
      "get": {
        "operationId": "get-services-id-connected-apps-app",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Connected app ID",
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "description": "Connected app ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectedAppOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get a connected app",
        "tags": [
          "Connected apps"
        ],
        "x-order": 138
      }
    },
    "/api/v1/services/{id}/connected-apps/{app}/block": {
      "post": {
        "description": "It can't sign anyone in or refresh tokens, and an app known by its metadata document stays blocked when the document changes. People keep their grants, so unblocking it brings their access back. Access tokens it already has work until they expire.",
        "operationId": "post-services-id-connected-apps-app-block",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Connected app ID",
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "description": "Connected app ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectedAppOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Block a connected app",
        "tags": [
          "Connected apps"
        ],
        "x-order": 139
      }
    },
    "/api/v1/services/{id}/connected-apps/{app}/unblock": {
      "post": {
        "operationId": "post-services-id-connected-apps-app-unblock",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Connected app ID",
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "description": "Connected app ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectedAppOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Unblock a connected app",
        "tags": [
          "Connected apps"
        ],
        "x-order": 140
      }
    },
    "/api/v1/services/{id}/connection": {
      "get": {
        "operationId": "get-services-id-connection",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Integration status",
        "tags": [
          "Services"
        ],
        "x-order": 72
      }
    },
    "/api/v1/services/{id}/connections": {
      "get": {
        "description": "Google, GitHub, OpenID Connect and OAuth 2.0 providers people can sign in with. Auth services only.",
        "operationId": "get-services-id-connections",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List sign in connections",
        "tags": [
          "Connections"
        ],
        "x-order": 130
      },
      "post": {
        "description": "Up to 20 per service, with one Google and one GitHub. Google and GitHub need a plan with social sign in, and OpenID Connect and OAuth 2.0 need one with custom sign in. An OpenID Connect connection reads the provider's discovery document right away.",
        "operationId": "post-services-id-connections",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConnectionInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Add a sign in connection",
        "tags": [
          "Connections"
        ],
        "x-order": 131
      }
    },
    "/api/v1/services/{id}/connections/{connection}": {
      "delete": {
        "description": "Unlinks everyone who connected it. People with no other way to sign in can still reset their password by email.",
        "operationId": "delete-services-id-connections-connection",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Connection ID",
            "in": "path",
            "name": "connection",
            "required": true,
            "schema": {
              "description": "Connection ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete a sign in connection",
        "tags": [
          "Connections"
        ],
        "x-order": 136
      },
      "get": {
        "operationId": "get-services-id-connections-connection",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Connection ID",
            "in": "path",
            "name": "connection",
            "required": true,
            "schema": {
              "description": "Connection ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get a sign in connection",
        "tags": [
          "Connections"
        ],
        "x-order": 132
      },
      "patch": {
        "description": "Send client_secret to replace the secret. Secrets are never returned. The kind and slug can't change.",
        "operationId": "patch-services-id-connections-connection",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Connection ID",
            "in": "path",
            "name": "connection",
            "required": true,
            "schema": {
              "description": "Connection ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConnectionInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Change a sign in connection",
        "tags": [
          "Connections"
        ],
        "x-order": 133
      }
    },
    "/api/v1/services/{id}/connections/{connection}/disable": {
      "post": {
        "description": "Its button disappears and nobody can sign in with it. People stay linked for when it's turned back on.",
        "operationId": "post-services-id-connections-connection-disable",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Connection ID",
            "in": "path",
            "name": "connection",
            "required": true,
            "schema": {
              "description": "Connection ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Turn a sign in connection off",
        "tags": [
          "Connections"
        ],
        "x-order": 135
      }
    },
    "/api/v1/services/{id}/connections/{connection}/enable": {
      "post": {
        "description": "Its button appears on the sign in and sign up pages. Needs a plan that includes its kind.",
        "operationId": "post-services-id-connections-connection-enable",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Connection ID",
            "in": "path",
            "name": "connection",
            "required": true,
            "schema": {
              "description": "Connection ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Turn a sign in connection on",
        "tags": [
          "Connections"
        ],
        "x-order": 134
      }
    },
    "/api/v1/services/{id}/customers": {
      "get": {
        "operationId": "get-services-id-customers",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "pending",
                "suspended",
                ""
              ],
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "q",
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "plan_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "next_cursor from the previous page",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "next_cursor from the previous page",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List customers",
        "tags": [
          "Customers"
        ],
        "x-order": 158
      }
    },
    "/api/v1/services/{id}/customers/export": {
      "get": {
        "operationId": "get-services-id-customers-export",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Export customers as CSV",
        "tags": [
          "Customers"
        ]
      }
    },
    "/api/v1/services/{id}/customers/invite": {
      "post": {
        "description": "Emails a link to create an account, which works for 14 days. Inviting the same email again replaces the old invite.",
        "operationId": "post-services-id-customers-invite",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteCustomerInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentBody"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Invite a customer to the portal",
        "tags": [
          "Customers"
        ],
        "x-order": 159
      }
    },
    "/api/v1/services/{id}/customers/invites": {
      "get": {
        "description": "Invites to the portal that nobody has accepted yet and that haven't expired.",
        "operationId": "get-services-id-customers-invites",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerInvitesBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List pending invites",
        "tags": [
          "Customers"
        ],
        "x-order": 160
      }
    },
    "/api/v1/services/{id}/customers/invites/{invite}": {
      "delete": {
        "description": "The link in the invite email stops working at once.",
        "operationId": "delete-services-id-customers-invites-invite",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Invite ID",
            "in": "path",
            "name": "invite",
            "required": true,
            "schema": {
              "description": "Invite ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Cancel an invite",
        "tags": [
          "Customers"
        ],
        "x-order": 162
      }
    },
    "/api/v1/services/{id}/customers/invites/{invite}/resend": {
      "post": {
        "description": "Emails a fresh link that works for 14 days. The link in the earlier email stops working.",
        "operationId": "post-services-id-customers-invites-invite-resend",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Invite ID",
            "in": "path",
            "name": "invite",
            "required": true,
            "schema": {
              "description": "Invite ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerInviteOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Resend an invite",
        "tags": [
          "Customers"
        ],
        "x-order": 161
      }
    },
    "/api/v1/services/{id}/customers/{customer}": {
      "delete": {
        "operationId": "delete-services-id-customers-customer",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 165
      },
      "get": {
        "operationId": "get-services-id-customers-customer",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerDetail"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 163
      },
      "patch": {
        "description": "Approve a pending customer with status active. Suspending blocks the customer's keys within a minute.",
        "operationId": "patch-services-id-customers-customer",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomerInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerDetail"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Update a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 164
      }
    },
    "/api/v1/services/{id}/customers/{customer}/credits": {
      "post": {
        "description": "Use this to sell credit outside Stripe. Pass ref to make the call safe to retry.",
        "operationId": "post-services-id-customers-customer-credits",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Add or remove credit",
        "tags": [
          "Customers"
        ],
        "x-order": 171
      }
    },
    "/api/v1/services/{id}/customers/{customer}/erase": {
      "post": {
        "description": "For answering an erasure request. Deletes the customer with its members, keys, usage and ledger, takes their names out of the activity log and cancels any subscription.",
        "operationId": "post-services-id-customers-customer-erase",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EraseCustomerInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Erase a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 167
      }
    },
    "/api/v1/services/{id}/customers/{customer}/export": {
      "get": {
        "description": "For answering a data access request. Includes members with their sessions, keys, invites, the ledger, daily usage and related activity.",
        "operationId": "get-services-id-customers-customer-export",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerExport"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Export everything about a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 166
      }
    },
    "/api/v1/services/{id}/customers/{customer}/keys": {
      "post": {
        "description": "The key belongs to the customer's team, which sees it in the portal. The secret is returned only once. A team holds up to 20 keys that aren't revoked, expired ones included.",
        "operationId": "post-services-id-customers-customer-keys",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerKeyInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedCustomerKeyBody"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a key for a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 174
      }
    },
    "/api/v1/services/{id}/customers/{customer}/keys/{key}": {
      "delete": {
        "operationId": "delete-services-id-customers-customer-keys-key",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Key ID",
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "description": "Key ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Revoke a customer's key",
        "tags": [
          "Customers"
        ],
        "x-order": 175
      }
    },
    "/api/v1/services/{id}/customers/{customer}/ledger": {
      "get": {
        "operationId": "get-services-id-customers-customer-ledger",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Customer ledger",
        "tags": [
          "Customers"
        ],
        "x-order": 172
      }
    },
    "/api/v1/services/{id}/customers/{customer}/limits": {
      "put": {
        "description": "Custom limits beat the customer's plan and the API defaults. null inherits.",
        "operationId": "put-services-id-customers-customer-limits",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LimitsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerDetail"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Set custom limits",
        "tags": [
          "Customers"
        ],
        "x-order": 170
      }
    },
    "/api/v1/services/{id}/customers/{customer}/members/{member}": {
      "delete": {
        "description": "Deletes the member's portal account. If they were the team's last admin, the longest serving teammate becomes one.",
        "operationId": "delete-services-id-customers-customer-members-member",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Portal member ID",
            "in": "path",
            "name": "member",
            "required": true,
            "schema": {
              "description": "Portal member ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Remove a member from a customer",
        "tags": [
          "Customers"
        ],
        "x-order": 168
      }
    },
    "/api/v1/services/{id}/customers/{customer}/members/{member}/reset-two-step": {
      "post": {
        "description": "For a member who lost their authenticator and recovery codes. Turns two step verification off, removes their passkeys, signs them out and emails them.",
        "operationId": "post-services-id-customers-customer-members-member-reset-two-step",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Portal member ID",
            "in": "path",
            "name": "member",
            "required": true,
            "schema": {
              "description": "Portal member ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Reset a member's two step verification",
        "tags": [
          "Customers"
        ],
        "x-order": 169
      }
    },
    "/api/v1/services/{id}/customers/{customer}/usage": {
      "get": {
        "operationId": "get-services-id-customers-customer-usage",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Customer ID",
            "in": "path",
            "name": "customer",
            "required": true,
            "schema": {
              "description": "Customer ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "days",
            "schema": {
              "default": 30,
              "format": "int64",
              "maximum": 90,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DayStat"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Customer usage by day",
        "tags": [
          "Customers"
        ],
        "x-order": 173
      }
    },
    "/api/v1/services/{id}/domain": {
      "delete": {
        "operationId": "delete-services-id-domain",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Remove the custom domain",
        "tags": [
          "Services"
        ],
        "x-order": 76
      },
      "put": {
        "operationId": "put-services-id-domain",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Set a custom portal domain",
        "tags": [
          "Services"
        ],
        "x-order": 74
      }
    },
    "/api/v1/services/{id}/domain/check": {
      "post": {
        "operationId": "post-services-id-domain-check",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Check the custom domain's DNS now",
        "tags": [
          "Services"
        ],
        "x-order": 75
      }
    },
    "/api/v1/services/{id}/domain/redirect": {
      "put": {
        "description": "Only page visits move. Sign ins that apps start on the microauth.dev address finish there, since it's their issuer. The custom domain has to be live to turn this on, and changing or removing the domain turns it off.",
        "operationId": "put-services-id-domain-redirect",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainRedirectInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Send visits on the microauth.dev address to the custom domain",
        "tags": [
          "Services"
        ],
        "x-order": 77
      }
    },
    "/api/v1/services/{id}/email-domain": {
      "delete": {
        "operationId": "delete-services-id-email-domain",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Stop sending from your own domain",
        "tags": [
          "Services"
        ],
        "x-order": 83
      },
      "patch": {
        "operationId": "patch-services-id-email-domain",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSenderInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Change the email sender",
        "tags": [
          "Services"
        ],
        "x-order": 79
      },
      "put": {
        "description": "Adds the domain to Mailraft, MicroAuth's email service, and answers with the DNS records to publish. Emails come from sender@domain once the records are verified and the service owns the domain. A domain another service also uses needs a TXT record that proves ownership. Setting another domain replaces the current one.",
        "operationId": "put-services-id-email-domain",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailDomainInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Send email from your own domain",
        "tags": [
          "Services"
        ],
        "x-order": 78
      }
    },
    "/api/v1/services/{id}/email-domain/check": {
      "post": {
        "operationId": "post-services-id-email-domain-check",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Check the email domain's DNS now",
        "tags": [
          "Services"
        ],
        "x-order": 81
      }
    },
    "/api/v1/services/{id}/email-domain/return-path": {
      "put": {
        "description": "Changes the name in front of the domain for the return path CNAME, ma-bounces unless renamed, for when that name is already taken in your DNS. Every service on the domain shares it, so this takes owning the domain or being the only service that uses it. Publish the new CNAME, then the old one can go.",
        "operationId": "put-services-id-email-domain-return-path",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailReturnPathInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Rename the return path",
        "tags": [
          "Services"
        ],
        "x-order": 80
      }
    },
    "/api/v1/services/{id}/email-domain/test": {
      "post": {
        "description": "Emails you from the service's domain, once its emails come from there.",
        "operationId": "post-services-id-email-domain-test",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Send a test email",
        "tags": [
          "Services"
        ],
        "x-order": 82
      }
    },
    "/api/v1/services/{id}/grants": {
      "get": {
        "description": "What each person allowed each app, newest first. Filter by app or by user.",
        "operationId": "get-services-id-grants",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Only this app's grants, by app ID. Works for your own applications too.",
            "explode": false,
            "in": "query",
            "name": "app",
            "schema": {
              "description": "Only this app's grants, by app ID. Works for your own applications too.",
              "type": "string"
            }
          },
          {
            "description": "Only this person's grants, by user ID",
            "explode": false,
            "in": "query",
            "name": "user",
            "schema": {
              "description": "Only this person's grants, by user ID",
              "type": "string"
            }
          },
          {
            "description": "next_cursor from the previous page",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "next_cursor from the previous page",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List grants",
        "tags": [
          "Connected apps"
        ],
        "x-order": 141
      }
    },
    "/api/v1/services/{id}/grants/{grant}": {
      "delete": {
        "description": "Disconnects the app from that person. Its refresh tokens stop working at once and the app has to ask again. Access tokens it already has work until they expire.",
        "operationId": "delete-services-id-grants-grant",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Grant ID",
            "in": "path",
            "name": "grant",
            "required": true,
            "schema": {
              "description": "Grant ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Revoke a grant",
        "tags": [
          "Connected apps"
        ],
        "x-order": 142
      }
    },
    "/api/v1/services/{id}/ledger": {
      "get": {
        "operationId": "get-services-id-ledger",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma separated kinds, for example topup,refund",
            "explode": false,
            "in": "query",
            "name": "kind",
            "schema": {
              "description": "Comma separated kinds, for example topup,refund",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "API ledger",
        "tags": [
          "Customers"
        ],
        "x-order": 176
      }
    },
    "/api/v1/services/{id}/logo": {
      "delete": {
        "operationId": "delete-services-id-logo",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Remove the logo",
        "tags": [
          "Services"
        ],
        "x-order": 66
      },
      "put": {
        "description": "Send the image as the raw request body with Content-Type image/png, image/jpeg or image/webp. Up to 512 KB.",
        "operationId": "put-services-id-logo",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Content-Type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "image/jpeg": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            },
            "image/png": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            },
            "image/webp": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Upload the logo",
        "tags": [
          "Services"
        ],
        "x-order": 65
      }
    },
    "/api/v1/services/{id}/permissions": {
      "get": {
        "description": "Auth services only.",
        "operationId": "get-services-id-permissions",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List permissions",
        "tags": [
          "Roles and permissions"
        ],
        "x-order": 105
      },
      "post": {
        "description": "Up to 200 per service. Names are unique and become OAuth scopes, so they can't be standard OpenID Connect scopes or start with microauth.",
        "operationId": "post-services-id-permissions",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePermissionInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Add a permission",
        "tags": [
          "Roles and permissions"
        ],
        "x-order": 106
      }
    },
    "/api/v1/services/{id}/permissions/{permission}": {
      "delete": {
        "description": "Roles that granted it stop granting it.",
        "operationId": "delete-services-id-permissions-permission",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Permission ID",
            "in": "path",
            "name": "permission",
            "required": true,
            "schema": {
              "description": "Permission ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete a permission",
        "tags": [
          "Roles and permissions"
        ],
        "x-order": 108
      },
      "patch": {
        "operationId": "patch-services-id-permissions-permission",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Permission ID",
            "in": "path",
            "name": "permission",
            "required": true,
            "schema": {
              "description": "Permission ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePermissionInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Change a permission",
        "tags": [
          "Roles and permissions"
        ],
        "x-order": 107
      }
    },
    "/api/v1/services/{id}/plan": {
      "post": {
        "description": "The plan must be for the service's kind. Returns a Stripe Checkout address for a first paid plan. Changes between paid plans and moves to Free apply right away.",
        "operationId": "post-services-id-plan",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanCheckoutInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UrlBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change the service's MicroAuth plan",
        "tags": [
          "MicroAuth plan"
        ],
        "x-order": 183
      }
    },
    "/api/v1/services/{id}/plans": {
      "get": {
        "operationId": "get-services-id-plans",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PlanOut"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List plans",
        "tags": [
          "Pricing"
        ],
        "x-order": 154
      },
      "post": {
        "operationId": "post-services-id-plans",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanFields"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a plan",
        "tags": [
          "Pricing"
        ],
        "x-order": 155
      }
    },
    "/api/v1/services/{id}/plans/{plan}": {
      "delete": {
        "description": "Plans with subscribers are archived instead: they stay on the plan but nobody new can pick it.",
        "operationId": "delete-services-id-plans-plan",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Plan ID",
            "in": "path",
            "name": "plan",
            "required": true,
            "schema": {
              "description": "Plan ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete or archive a plan",
        "tags": [
          "Pricing"
        ],
        "x-order": 157
      },
      "put": {
        "description": "Replaces the plan's settings. A changed monthly price creates a new Stripe price for new subscribers; current subscribers keep their price until they change plans.",
        "operationId": "put-services-id-plans-plan",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Plan ID",
            "in": "path",
            "name": "plan",
            "required": true,
            "schema": {
              "description": "Plan ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanFields"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Update a plan",
        "tags": [
          "Pricing"
        ],
        "x-order": 156
      }
    },
    "/api/v1/services/{id}/resources": {
      "get": {
        "description": "The servers apps can ask for access tokens to, with the permissions each one offers. Auth services only.",
        "operationId": "get-services-id-resources",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcesBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List APIs and MCP servers",
        "tags": [
          "APIs and MCP servers"
        ],
        "x-order": 93
      },
      "post": {
        "description": "Up to 50 per service. The URL is stored in canonical form (RFC 8707): https, or http on localhost, with a lowercase host, no default port, query or fragment, and no lone trailing slash.",
        "operationId": "post-services-id-resources",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateResourceInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Add an API or MCP server",
        "tags": [
          "APIs and MCP servers"
        ],
        "x-order": 94
      }
    },
    "/api/v1/services/{id}/resources/{resource}": {
      "delete": {
        "description": "Refresh tokens issued for it stop working. Access tokens already issued last until they expire.",
        "operationId": "delete-services-id-resources-resource",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Resource ID",
            "in": "path",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Resource ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete an API or MCP server",
        "tags": [
          "APIs and MCP servers"
        ],
        "x-order": 97
      },
      "get": {
        "description": "The same object the list returns.",
        "operationId": "get-services-id-resources-resource",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Resource ID",
            "in": "path",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Resource ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get an API or MCP server",
        "tags": [
          "APIs and MCP servers"
        ],
        "x-order": 95
      },
      "patch": {
        "description": "Refresh tokens pick up permission changes at their next use.",
        "operationId": "patch-services-id-resources-resource",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Resource ID",
            "in": "path",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Resource ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateResourceInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Change an API or MCP server",
        "tags": [
          "APIs and MCP servers"
        ],
        "x-order": 96
      }
    },
    "/api/v1/services/{id}/resources/{resource}/check": {
      "post": {
        "description": "Fetches the server's protected resource metadata (RFC 9728) and checks that it names this resource and this auth service. Problems are in plain words for showing as they are. Up to 30 checks an hour per service. Servers on private networks can't be checked.",
        "operationId": "post-services-id-resources-resource-check",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Resource ID",
            "in": "path",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Resource ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpCheckOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Check an MCP server",
        "tags": [
          "APIs and MCP servers"
        ],
        "x-order": 143
      }
    },
    "/api/v1/services/{id}/resources/{resource}/credentials": {
      "post": {
        "description": "A client ID and secret the API or MCP server sends to /oauth/introspect, with HTTP Basic, to check access tokens and API keys. The secret is shown only this once.",
        "operationId": "post-services-id-resources-resource-credentials",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Resource ID",
            "in": "path",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Resource ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerCredentialsBody"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create server credentials",
        "tags": [
          "API keys for your users"
        ],
        "x-order": 100
      }
    },
    "/api/v1/services/{id}/resources/{resource}/credentials/rotate": {
      "post": {
        "description": "The old secret keeps working for 24 hours, so the server can switch over without downtime.",
        "operationId": "post-services-id-resources-resource-credentials-rotate",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Resource ID",
            "in": "path",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Resource ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerCredentialsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Rotate a server secret",
        "tags": [
          "API keys for your users"
        ],
        "x-order": 101
      }
    },
    "/api/v1/services/{id}/roles": {
      "get": {
        "description": "Auth services only.",
        "operationId": "get-services-id-roles",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RolesBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List roles",
        "tags": [
          "Roles and permissions"
        ],
        "x-order": 109
      },
      "post": {
        "description": "Up to 50 per service, 20 of them default roles. Names are unique, ignoring case.",
        "operationId": "post-services-id-roles",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleFields"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Add a role",
        "tags": [
          "Roles and permissions"
        ],
        "x-order": 110
      }
    },
    "/api/v1/services/{id}/roles/{role}": {
      "delete": {
        "description": "Everyone who had it loses it, and pending invites no longer give it.",
        "operationId": "delete-services-id-roles-role",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Role ID",
            "in": "path",
            "name": "role",
            "required": true,
            "schema": {
              "description": "Role ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete a role",
        "tags": [
          "Roles and permissions"
        ],
        "x-order": 112
      },
      "patch": {
        "operationId": "patch-services-id-roles-role",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Role ID",
            "in": "path",
            "name": "role",
            "required": true,
            "schema": {
              "description": "Role ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Change a role",
        "tags": [
          "Roles and permissions"
        ],
        "x-order": 111
      }
    },
    "/api/v1/services/{id}/secret": {
      "get": {
        "operationId": "get-services-id-secret",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Reveal the SDK secret key",
        "tags": [
          "Services"
        ],
        "x-order": 67
      }
    },
    "/api/v1/services/{id}/secret/rotate": {
      "post": {
        "operationId": "post-services-id-secret-rotate",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Rotate the SDK secret key",
        "tags": [
          "Services"
        ],
        "x-order": 68
      }
    },
    "/api/v1/services/{id}/signing-keys": {
      "get": {
        "description": "The RSA keys in the service's JWKS, newest first. A service gets its first key when it first signs a token.",
        "operationId": "get-services-id-signing-keys",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigningKeysBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List signing keys",
        "tags": [
          "Signing keys"
        ],
        "x-order": 113
      }
    },
    "/api/v1/services/{id}/signing-keys/rotate": {
      "post": {
        "description": "New tokens are signed with a new key at once. The old key stays in JWKS for a day past the access token lifetime, so tokens it signed keep working until they expire. Up to 5 keys can be published at a time. Needs the admin role.",
        "operationId": "post-services-id-signing-keys-rotate",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigningKeysBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Rotate the signing key",
        "tags": [
          "Signing keys"
        ],
        "x-order": 114
      }
    },
    "/api/v1/services/{id}/stats": {
      "get": {
        "operationId": "get-services-id-stats",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "days",
            "schema": {
              "default": 30,
              "format": "int64",
              "maximum": 90,
              "minimum": 7,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Usage and revenue",
        "tags": [
          "Services"
        ],
        "x-order": 73
      }
    },
    "/api/v1/services/{id}/stripe": {
      "delete": {
        "description": "Card payments stop right away. Existing subscriptions keep running in Stripe until you cancel them there.",
        "operationId": "delete-services-id-stripe",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Disconnect Stripe",
        "tags": [
          "Payments"
        ],
        "x-order": 180
      }
    },
    "/api/v1/services/{id}/stripe/connect": {
      "post": {
        "description": "Returns the Stripe address to send the browser to. Stripe sends the owner back to the dashboard when they finish.",
        "operationId": "post-services-id-stripe-connect",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UrlBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Start connecting Stripe",
        "tags": [
          "Payments"
        ],
        "x-order": 177
      }
    },
    "/api/v1/services/{id}/stripe/refresh": {
      "post": {
        "operationId": "post-services-id-stripe-refresh",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Refresh the Stripe account status",
        "tags": [
          "Payments"
        ],
        "x-order": 179
      }
    },
    "/api/v1/services/{id}/test-credit": {
      "post": {
        "operationId": "post-services-id-test-credit",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestKeyBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Add $5 of test credit",
        "tags": [
          "Services"
        ],
        "x-order": 71
      }
    },
    "/api/v1/services/{id}/test-key": {
      "get": {
        "operationId": "get-services-id-test-key",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestKeyBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get the test customer's key",
        "tags": [
          "Services"
        ],
        "x-order": 69
      }
    },
    "/api/v1/services/{id}/test-key/regenerate": {
      "post": {
        "operationId": "post-services-id-test-key-regenerate",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestKeyBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Replace the test customer's key",
        "tags": [
          "Services"
        ],
        "x-order": 70
      }
    },
    "/api/v1/services/{id}/transfer": {
      "delete": {
        "operationId": "delete-services-id-transfer",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Cancel the service's transfer",
        "tags": [
          "Transfers"
        ],
        "x-order": 146
      },
      "get": {
        "operationId": "get-services-id-transfer",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingTransfer"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get the service's pending transfer",
        "tags": [
          "Transfers"
        ],
        "x-order": 145
      },
      "post": {
        "description": "Emails the new owner a link to accept the service into a workspace they own. Only an owner can do this, after confirming it's them. It expires in 7 days.",
        "operationId": "post-services-id-transfer",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceTransferInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Transfer a service",
        "tags": [
          "Transfers"
        ],
        "x-order": 144
      }
    },
    "/api/v1/services/{id}/try-sign-in": {
      "get": {
        "description": "The claims from the last try that finished in this dashboard session, for 10 minutes. Nothing else from the sign in is kept.",
        "operationId": "get-services-id-try-sign-in",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TryResultBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get the last Try sign in",
        "tags": [
          "Applications"
        ],
        "x-order": 91
      },
      "post": {
        "description": "Returns the address of a real sign in on the service's sign in page, for an app MicroAuth keeps for this. The sign in comes back to the dashboard, which shows what an app would get. Any member of the service's workspace can start one. It works once, only in the dashboard session that started it, and for 10 minutes.",
        "operationId": "post-services-id-try-sign-in",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TryStartInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TryStartOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Start Try sign in",
        "tags": [
          "Applications"
        ],
        "x-order": 90
      }
    },
    "/api/v1/services/{id}/users": {
      "get": {
        "description": "The people who signed up for an auth service, newest first.",
        "operationId": "get-services-id-users",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Part of an email or name",
            "explode": false,
            "in": "query",
            "name": "q",
            "schema": {
              "description": "Part of an email or name",
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "suspended",
                ""
              ],
              "type": "string"
            }
          },
          {
            "description": "next_cursor from the previous page",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "next_cursor from the previous page",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List users",
        "tags": [
          "Users"
        ],
        "x-order": 115
      }
    },
    "/api/v1/services/{id}/users/invites": {
      "get": {
        "description": "Invites nobody has accepted yet and that haven't expired, newest first.",
        "operationId": "get-services-id-users-invites",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserInvitesBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List pending invites",
        "tags": [
          "Users"
        ],
        "x-order": 116
      },
      "post": {
        "description": "Emails a link to create an account, which works for 14 days. Inviting the same email again replaces the old invite.",
        "operationId": "post-services-id-users-invites",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserInviteInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserInviteOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Invite someone",
        "tags": [
          "Users"
        ],
        "x-order": 117
      }
    },
    "/api/v1/services/{id}/users/invites/{invite}": {
      "delete": {
        "description": "The link in the invite email stops working at once.",
        "operationId": "delete-services-id-users-invites-invite",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Invite ID",
            "in": "path",
            "name": "invite",
            "required": true,
            "schema": {
              "description": "Invite ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Cancel an invite",
        "tags": [
          "Users"
        ],
        "x-order": 119
      }
    },
    "/api/v1/services/{id}/users/invites/{invite}/resend": {
      "post": {
        "description": "Emails a fresh link that works for 14 days. The link in the earlier email stops working.",
        "operationId": "post-services-id-users-invites-invite-resend",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Invite ID",
            "in": "path",
            "name": "invite",
            "required": true,
            "schema": {
              "description": "Invite ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserInviteOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Resend an invite",
        "tags": [
          "Users"
        ],
        "x-order": 118
      }
    },
    "/api/v1/services/{id}/users/{user}": {
      "delete": {
        "description": "Deletes their account with their photo, sessions, passkeys, API keys and connected apps, and emails them. Needs the admin role.",
        "operationId": "delete-services-id-users-user",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete a user",
        "tags": [
          "Users"
        ],
        "x-order": 121
      },
      "get": {
        "description": "Their profile, roles, sessions and the ways they sign in.",
        "operationId": "get-services-id-users-user",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonDetail"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get a user",
        "tags": [
          "Users"
        ],
        "x-order": 120
      }
    },
    "/api/v1/services/{id}/users/{user}/api-keys": {
      "delete": {
        "operationId": "delete-services-id-users-user-api-keys",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Revoke all of a user's API keys",
        "tags": [
          "API keys for your users"
        ],
        "x-order": 104
      },
      "get": {
        "description": "Keys that aren't revoked, newest first, with where each was made and last used. Secrets are never shown.",
        "operationId": "get-services-id-users-user-api-keys",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonKeysBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List a user's API keys",
        "tags": [
          "API keys for your users"
        ],
        "x-order": 102
      }
    },
    "/api/v1/services/{id}/users/{user}/api-keys/{key}": {
      "delete": {
        "description": "APIs refuse it within 30 seconds, as their cached answers expire.",
        "operationId": "delete-services-id-users-user-api-keys-key",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "API key ID",
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "description": "API key ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Revoke a user's API key",
        "tags": [
          "API keys for your users"
        ],
        "x-order": 103
      }
    },
    "/api/v1/services/{id}/users/{user}/password-reset": {
      "post": {
        "description": "Emails them a link to the reset page, where they get a code to choose a new password. Their current password keeps working until then.",
        "operationId": "post-services-id-users-user-password-reset",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentBody"
                }
              }
            },
            "description": "Accepted"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Ask a user to reset their password",
        "tags": [
          "Users"
        ],
        "x-order": 125
      }
    },
    "/api/v1/services/{id}/users/{user}/photo": {
      "delete": {
        "description": "They go back to their default avatar.",
        "operationId": "delete-services-id-users-user-photo",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Remove a user's photo",
        "tags": [
          "Users"
        ],
        "x-order": 127
      }
    },
    "/api/v1/services/{id}/users/{user}/roles/{role}": {
      "delete": {
        "operationId": "delete-services-id-users-user-roles-role",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Role ID",
            "in": "path",
            "name": "role",
            "required": true,
            "schema": {
              "description": "Role ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonRolesBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Take a role from a user",
        "tags": [
          "Users"
        ],
        "x-order": 129
      },
      "put": {
        "description": "A person can have up to 20 roles.",
        "operationId": "put-services-id-users-user-roles-role",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Role ID",
            "in": "path",
            "name": "role",
            "required": true,
            "schema": {
              "description": "Role ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonRolesBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Give a user a role",
        "tags": [
          "Users"
        ],
        "x-order": 128
      }
    },
    "/api/v1/services/{id}/users/{user}/sign-out": {
      "post": {
        "operationId": "post-services-id-users-user-sign-out",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Sign a user out everywhere",
        "tags": [
          "Users"
        ],
        "x-order": 124
      }
    },
    "/api/v1/services/{id}/users/{user}/suspend": {
      "post": {
        "description": "Signs them out everywhere and stops them signing in until they're unsuspended.",
        "operationId": "post-services-id-users-user-suspend",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Suspend a user",
        "tags": [
          "Users"
        ],
        "x-order": 122
      }
    },
    "/api/v1/services/{id}/users/{user}/two-step/reset": {
      "post": {
        "description": "For someone who lost their authenticator and recovery codes. Turns two step verification off, removes their passkeys, signs them out and emails them. Needs the admin role.",
        "operationId": "post-services-id-users-user-two-step-reset",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Reset a user's two step verification",
        "tags": [
          "Users"
        ],
        "x-order": 126
      }
    },
    "/api/v1/services/{id}/users/{user}/unsuspend": {
      "post": {
        "operationId": "post-services-id-users-user-unsuspend",
        "parameters": [
          {
            "description": "Service ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Service ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "description": "User ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Unsuspend a user",
        "tags": [
          "Users"
        ],
        "x-order": 123
      }
    },
    "/api/v1/slug-available": {
      "get": {
        "operationId": "get-slug-available",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "slug",
            "schema": {
              "maxLength": 60,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlugBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Check an address",
        "tags": [
          "Services"
        ],
        "x-order": 60
      }
    },
    "/api/v1/transfers/{token}": {
      "get": {
        "description": "Shows what moves and, when you're signed in with the transfer's email, whether you can accept it and where.",
        "operationId": "get-transfers-token",
        "parameters": [
          {
            "description": "Token from the transfer email, or the transfer ID when you're signed in with its email",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "description": "Token from the transfer email, or the transfer ID when you're signed in with its email",
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferInfo"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Look up a transfer",
        "tags": [
          "Transfers"
        ],
        "x-order": 151
      }
    },
    "/api/v1/transfers/{token}/accept": {
      "post": {
        "description": "Sign in with the transfer's email first, or send a name and password to create the account.",
        "operationId": "post-transfers-token-accept",
        "parameters": [
          {
            "description": "Token from the transfer email, or the transfer ID when you're signed in with its email",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "description": "Token from the transfer email, or the transfer ID when you're signed in with its email",
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptTransferInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferAccepted"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Accept a transfer",
        "tags": [
          "Transfers"
        ],
        "x-order": 152
      }
    },
    "/api/v1/transfers/{token}/decline": {
      "post": {
        "operationId": "post-transfers-token-decline",
        "parameters": [
          {
            "description": "Token from the transfer email, or the transfer ID when you're signed in with its email",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "description": "Token from the transfer email, or the transfer ID when you're signed in with its email",
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Decline a transfer",
        "tags": [
          "Transfers"
        ],
        "x-order": 153
      }
    },
    "/api/v1/workspaces": {
      "post": {
        "operationId": "post-workspaces",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NameInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Create a workspace",
        "tags": [
          "Workspaces"
        ],
        "x-order": 44
      }
    },
    "/api/v1/workspaces/{wid}": {
      "delete": {
        "operationId": "delete-workspaces-wid",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete an empty workspace",
        "tags": [
          "Workspaces"
        ],
        "x-order": 47
      },
      "get": {
        "operationId": "get-workspaces-wid",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get a workspace",
        "tags": [
          "Workspaces"
        ],
        "x-order": 45
      },
      "patch": {
        "operationId": "patch-workspaces-wid",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WsNameInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Rename a workspace",
        "tags": [
          "Workspaces"
        ],
        "x-order": 46
      }
    },
    "/api/v1/workspaces/{wid}/audit": {
      "get": {
        "operationId": "get-workspaces-wid-audit",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Only events for this service",
            "explode": false,
            "in": "query",
            "name": "service_id",
            "schema": {
              "description": "Only events for this service",
              "type": "string"
            }
          },
          {
            "description": "Only events for this customer",
            "explode": false,
            "in": "query",
            "name": "customer_id",
            "schema": {
              "description": "Only events for this customer",
              "type": "string"
            }
          },
          {
            "description": "Action prefix, for example customer. or key.revoked. Separate several with commas to match any of them.",
            "explode": false,
            "in": "query",
            "name": "action",
            "schema": {
              "description": "Action prefix, for example customer. or key.revoked. Separate several with commas to match any of them.",
              "maxLength": 500,
              "type": "string"
            }
          },
          {
            "description": "Actor type: user, key, portal_user, system, stripe or admin",
            "explode": false,
            "in": "query",
            "name": "actor",
            "schema": {
              "description": "Actor type: user, key, portal_user, system, stripe or admin",
              "type": "string"
            }
          },
          {
            "description": "Matches the summary or actor name",
            "explode": false,
            "in": "query",
            "name": "q",
            "schema": {
              "description": "Matches the summary or actor name",
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "description": "Cursor from next_before",
            "explode": false,
            "in": "query",
            "name": "before",
            "schema": {
              "description": "Cursor from next_before",
              "type": "string"
            }
          },
          {
            "description": "Only events after this RFC 3339 time",
            "explode": false,
            "in": "query",
            "name": "since",
            "schema": {
              "description": "Only events after this RFC 3339 time",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Activity log",
        "tags": [
          "Workspaces"
        ],
        "x-order": 56
      }
    },
    "/api/v1/workspaces/{wid}/audit/export": {
      "get": {
        "description": "Streams every matching event as CSV or JSON Lines, newest first, up to 100,000 rows.",
        "operationId": "get-workspaces-wid-audit-export",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Only events for this service",
            "explode": false,
            "in": "query",
            "name": "service_id",
            "schema": {
              "description": "Only events for this service",
              "type": "string"
            }
          },
          {
            "description": "Only events for this customer",
            "explode": false,
            "in": "query",
            "name": "customer_id",
            "schema": {
              "description": "Only events for this customer",
              "type": "string"
            }
          },
          {
            "description": "Action prefix, for example customer. or key.revoked. Separate several with commas to match any of them.",
            "explode": false,
            "in": "query",
            "name": "action",
            "schema": {
              "description": "Action prefix, for example customer. or key.revoked. Separate several with commas to match any of them.",
              "maxLength": 500,
              "type": "string"
            }
          },
          {
            "description": "Actor type: user, key, portal_user, system, stripe or admin",
            "explode": false,
            "in": "query",
            "name": "actor",
            "schema": {
              "description": "Actor type: user, key, portal_user, system, stripe or admin",
              "type": "string"
            }
          },
          {
            "description": "Matches the summary or actor name",
            "explode": false,
            "in": "query",
            "name": "q",
            "schema": {
              "description": "Matches the summary or actor name",
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "description": "Cursor from next_before",
            "explode": false,
            "in": "query",
            "name": "before",
            "schema": {
              "description": "Cursor from next_before",
              "type": "string"
            }
          },
          {
            "description": "Only events after this RFC 3339 time",
            "explode": false,
            "in": "query",
            "name": "since",
            "schema": {
              "description": "Only events after this RFC 3339 time",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "format",
            "schema": {
              "default": "csv",
              "enum": [
                "csv",
                "json"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Export the activity log",
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/api/v1/workspaces/{wid}/billing-portal": {
      "post": {
        "operationId": "post-workspaces-wid-billing-portal",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UrlBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Open MicroAuth billing",
        "tags": [
          "MicroAuth plan"
        ],
        "x-order": 184
      }
    },
    "/api/v1/workspaces/{wid}/free-tier": {
      "get": {
        "description": "Each owner gets one Free service of each kind across their workspaces. Says whether a service of the kind created here now would start paused.",
        "operationId": "get-workspaces-wid-free-tier",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The kind of service you're about to create",
            "explode": false,
            "in": "query",
            "name": "kind",
            "required": true,
            "schema": {
              "description": "The kind of service you're about to create",
              "enum": [
                "auth",
                "api"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreeTierCheckBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Check the free allowance",
        "tags": [
          "Services"
        ],
        "x-order": 59
      }
    },
    "/api/v1/workspaces/{wid}/invites": {
      "post": {
        "operationId": "post-workspaces-wid-invites",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Invite a teammate",
        "tags": [
          "Workspaces"
        ],
        "x-order": 49
      }
    },
    "/api/v1/workspaces/{wid}/invites/{item}": {
      "delete": {
        "operationId": "delete-workspaces-wid-invites-item",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's user ID, the invite ID or the key ID, matching the path",
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "description": "The member's user ID, the invite ID or the key ID, matching the path",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Cancel an invite",
        "tags": [
          "Workspaces"
        ],
        "x-order": 50
      }
    },
    "/api/v1/workspaces/{wid}/keys": {
      "get": {
        "operationId": "get-workspaces-wid-keys",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/KeyOut"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List workspace API keys",
        "tags": [
          "Workspaces"
        ],
        "x-order": 53
      },
      "post": {
        "operationId": "post-workspaces-wid-keys",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewKeyBody"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Create a workspace API key",
        "tags": [
          "Workspaces"
        ],
        "x-order": 54
      }
    },
    "/api/v1/workspaces/{wid}/keys/{item}": {
      "delete": {
        "operationId": "delete-workspaces-wid-keys-item",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's user ID, the invite ID or the key ID, matching the path",
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "description": "The member's user ID, the invite ID or the key ID, matching the path",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Revoke a workspace API key",
        "tags": [
          "Workspaces"
        ],
        "x-order": 55
      }
    },
    "/api/v1/workspaces/{wid}/members": {
      "get": {
        "operationId": "get-workspaces-wid-members",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembersBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List members and pending invites",
        "tags": [
          "Workspaces"
        ],
        "x-order": 48
      }
    },
    "/api/v1/workspaces/{wid}/members/{item}": {
      "delete": {
        "operationId": "delete-workspaces-wid-members-item",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The member's user ID, the invite ID or the key ID, matching the path",
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "description": "The member's user ID, the invite ID or the key ID, matching the path",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Remove a member or leave",
        "tags": [
          "Workspaces"
        ],
        "x-order": 52
      },
      "patch": {
        "operationId": "patch-workspaces-wid-members-item",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "User ID of the member",
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "description": "User ID of the member",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change a member's role",
        "tags": [
          "Workspaces"
        ],
        "x-order": 51
      }
    },
    "/api/v1/workspaces/{wid}/platform-plans": {
      "get": {
        "description": "The public plans of a kind, custom plans offered to this workspace, and any plan one of its services is on.",
        "operationId": "get-workspaces-wid-platform-plans",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The kind of service the plans are for",
            "explode": false,
            "in": "query",
            "name": "kind",
            "required": true,
            "schema": {
              "description": "The kind of service the plans are for",
              "enum": [
                "api",
                "auth"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PlatformPlanOut"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "MicroAuth plans for a workspace",
        "tags": [
          "MicroAuth plan"
        ],
        "x-order": 182
      }
    },
    "/api/v1/workspaces/{wid}/services": {
      "get": {
        "operationId": "get-workspaces-wid-services",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ServiceSummary"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List services",
        "tags": [
          "Services"
        ],
        "x-order": 57
      },
      "post": {
        "description": "An auth service signs people in to your own apps. An API service gives your API keys, limits and a developer portal, whether you sell it or keep it for your own teams. Only API services get an SDK secret key.",
        "operationId": "post-workspaces-wid-services",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServiceInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedServiceBody"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a service",
        "tags": [
          "Services"
        ],
        "x-order": 58
      }
    },
    "/api/v1/workspaces/{wid}/transfer": {
      "delete": {
        "operationId": "delete-workspaces-wid-transfer",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Cancel the workspace's transfer",
        "tags": [
          "Transfers"
        ],
        "x-order": 149
      },
      "get": {
        "operationId": "get-workspaces-wid-transfer",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingTransfer"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Get the workspace's pending transfer",
        "tags": [
          "Transfers"
        ],
        "x-order": 148
      },
      "post": {
        "description": "Emails the new owner a link to take over the workspace and its services. Only an owner can do this, after confirming it's them. It expires in 7 days.",
        "operationId": "post-workspaces-wid-transfer",
        "parameters": [
          {
            "description": "Workspace ID",
            "in": "path",
            "name": "wid",
            "required": true,
            "schema": {
              "description": "Workspace ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceTransferInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOut"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Transfer a workspace",
        "tags": [
          "Transfers"
        ],
        "x-order": 147
      }
    },
    "/sdk/v1/keys/verify": {
      "get": {
        "description": "Looks up a single key hash. Useful right after a developer creates a key, before the next snapshot.",
        "operationId": "get-sdk-v1-keys-verify",
        "parameters": [
          {
            "description": "Bearer followed by the API's SDK secret (mas_...)",
            "in": "header",
            "name": "Authorization",
            "schema": {
              "description": "Bearer followed by the API's SDK secret (mas_...)",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Lowercase sha256 hex of the API key your API received",
            "explode": false,
            "in": "query",
            "name": "key_hash",
            "schema": {
              "description": "Lowercase sha256 hex of the API key your API received",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sdk": []
          }
        ],
        "servers": [
          {
            "url": "https://api.microauth.com"
          }
        ],
        "summary": "Verify one key",
        "tags": [
          "SDK"
        ],
        "x-order": 206
      }
    },
    "/sdk/v1/snapshot": {
      "get": {
        "description": "Customers, key hashes and effective limits for the API that owns the secret. Poll it about every 30 seconds with If-None-Match.",
        "operationId": "get-sdk-v1-snapshot",
        "parameters": [
          {
            "description": "Bearer followed by the API's SDK secret (mas_...)",
            "in": "header",
            "name": "Authorization",
            "schema": {
              "description": "Bearer followed by the API's SDK secret (mas_...)",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "description": "Send it back as If-None-Match to get a 304 when nothing changed",
                  "type": "string"
                }
              },
              "X-MicroAuth-Generated-At": {
                "schema": {
                  "description": "generated_at of the snapshot, sent on 304 responses too",
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sdk": []
          }
        ],
        "servers": [
          {
            "url": "https://api.microauth.com"
          }
        ],
        "summary": "Get the access snapshot",
        "tags": [
          "SDK"
        ],
        "x-order": 205
      }
    },
    "/sdk/v1/usage": {
      "post": {
        "description": "Reports served requests. Every item is idempotent by idempotency_key. Items marked retry can be sent again unchanged.",
        "operationId": "post-sdk-v1-usage",
        "parameters": [
          {
            "description": "Bearer followed by the API's SDK secret (mas_...)",
            "in": "header",
            "name": "Authorization",
            "schema": {
              "description": "Bearer followed by the API's SDK secret (mas_...)",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "User-Agent",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsageInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageBody"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "sdk": []
          }
        ],
        "servers": [
          {
            "url": "https://api.microauth.com"
          }
        ],
        "summary": "Report usage",
        "tags": [
          "SDK"
        ],
        "x-order": 207
      }
    }
  },
  "servers": [
    {
      "url": "https://microauth.com"
    }
  ]
}
