{
  "components": {
    "schemas": {
      "AcceptInviteInBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "password": {
            "maxLength": 72,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ApiOut": {
        "additionalProperties": false,
        "properties": {
          "accent_color": {
            "type": "string"
          },
          "api_base_url": {
            "description": "Where your API runs, shown in the portal quickstart",
            "type": "string"
          },
          "auto_recharge_allowed": {
            "type": "boolean"
          },
          "billable_status_codes": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "docs_url": {
            "type": "string"
          },
          "domain": {
            "$ref": "#/components/schemas/DomainOut"
          },
          "first_usage_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key_header": {
            "description": "Header customers send their key in",
            "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"
          },
          "payg_enabled": {
            "description": "Customers can buy prepaid credit",
            "type": "boolean"
          },
          "plan": {
            "$ref": "#/components/schemas/PlatformPlanOut"
          },
          "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"
          },
          "plans_enabled": {
            "description": "Customers can subscribe to public plans",
            "type": "boolean"
          },
          "portal_url": {
            "type": "string"
          },
          "previous_secret_valid_until": {
            "format": "date-time",
            "type": "string"
          },
          "price_per_request_micro": {
            "format": "int64",
            "type": "integer"
          },
          "privacy_url": {
            "type": "string"
          },
          "role": {
            "description": "Your role in the API'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": {
            "type": "string"
          },
          "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_reason": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "terms_url": {
            "type": "string"
          },
          "topup_amounts_cents": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "website_url": {
            "type": "string"
          },
          "welcome_credit_micro": {
            "format": "int64",
            "type": "integer"
          },
          "workspace_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "slug",
          "name",
          "status",
          "portal_url",
          "tagline",
          "accent_color",
          "support_email",
          "website_url",
          "docs_url",
          "terms_url",
          "privacy_url",
          "signup_mode",
          "api_base_url",
          "key_header",
          "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",
          "secret_prefix",
          "domain",
          "plan",
          "plan_status",
          "stripe",
          "role",
          "created_at"
        ],
        "type": "object"
      },
      "ApiSummary": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "customers": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "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",
          "name",
          "slug",
          "status",
          "portal_url",
          "plan_code",
          "customers",
          "month_requests",
          "created_at"
        ],
        "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"
          },
          "api_id": {
            "type": "string"
          },
          "api_name": {
            "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"
          },
          "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"
          },
          "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"
        ],
        "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"
      },
      "ConnectionBody": {
        "additionalProperties": false,
        "properties": {
          "customers": {
            "format": "int64",
            "type": "integer"
          },
          "first_usage_at": {
            "format": "date-time",
            "type": "string"
          },
          "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"
        ],
        "type": "object"
      },
      "CreateAPIInBody": {
        "additionalProperties": false,
        "properties": {
          "api_base_url": {
            "maxLength": 300,
            "type": "string"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "preset": {
            "default": "payg",
            "description": "Starting pricing, change it any time",
            "enum": [
              "payg",
              "free",
              "subscriptions"
            ],
            "type": "string"
          },
          "slug": {
            "description": "Portal address, \u003cslug\u003e.microauth.dev. Generated from the name when empty.",
            "maxLength": 40,
            "type": "string"
          }
        },
        "required": [
          "name",
          "preset"
        ],
        "type": "object"
      },
      "CreatedAPIBody": {
        "additionalProperties": false,
        "properties": {
          "api": {
            "$ref": "#/components/schemas/ApiOut"
          },
          "secret": {
            "description": "SDK secret key. You can reveal it again from the API's Connect page.",
            "type": "string"
          }
        },
        "required": [
          "api",
          "secret"
        ],
        "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"
      },
      "CustomerKey": {
        "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"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "created_at"
        ],
        "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"
      },
      "DomainInBody": {
        "additionalProperties": false,
        "properties": {
          "domain": {
            "maxLength": 253,
            "type": "string"
          }
        },
        "required": [
          "domain"
        ],
        "type": "object"
      },
      "DomainOut": {
        "additionalProperties": false,
        "properties": {
          "allowed": {
            "description": "The API'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"
          },
          "status": {
            "enum": [
              "none",
              "pending",
              "verified",
              "active",
              "failed"
            ],
            "type": "string"
          },
          "txt_name": {
            "type": "string"
          },
          "txt_value": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "cname_target",
          "allowed"
        ],
        "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"
      },
      "EmailInBody": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Email address",
            "maxLength": 254,
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "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"
      },
      "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"
      },
      "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"
          },
          "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"
      },
      "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"
          },
          "role": {
            "type": "string"
          },
          "two_factor": {
            "type": "boolean"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "email",
          "name",
          "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"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "role",
          "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"
      },
      "PasswordInBody": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "maxLength": 200,
            "type": "string"
          },
          "password": {
            "maxLength": 72,
            "minLength": 10,
            "type": "string"
          }
        },
        "required": [
          "current_password",
          "password"
        ],
        "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"
          },
          "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"
          },
          "visibility": {
            "enum": [
              "public",
              "private"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "price_monthly_cents",
          "credit_micro",
          "price_per_request_micro",
          "rps",
          "monthly_quota",
          "visibility",
          "active",
          "sort",
          "subscribers",
          "created_at"
        ],
        "type": "object"
      },
      "PlatformPlanOut": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "custom_domain": {
            "type": "boolean"
          },
          "max_customers": {
            "format": "int32",
            "type": "integer"
          },
          "monthly_requests": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "price_monthly_cents": {
            "format": "int32",
            "type": "integer"
          },
          "purchasable": {
            "description": "True when checkout is available for this plan",
            "type": "boolean"
          },
          "remove_branding": {
            "type": "boolean"
          },
          "teams": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "name",
          "price_monthly_cents",
          "monthly_requests",
          "max_customers",
          "custom_domain",
          "teams",
          "remove_branding",
          "purchasable"
        ],
        "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"
      },
      "RoleInBody": {
        "additionalProperties": false,
        "properties": {
          "role": {
            "enum": [
              "owner",
              "admin",
              "editor",
              "viewer"
            ],
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "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"
      },
      "SecretBody": {
        "additionalProperties": false,
        "properties": {
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "secret"
        ],
        "type": "object"
      },
      "SentBody": {
        "additionalProperties": false,
        "properties": {
          "sent": {
            "type": "boolean"
          }
        },
        "required": [
          "sent"
        ],
        "type": "object"
      },
      "SessionBody": {
        "additionalProperties": false,
        "properties": {
          "user": {
            "$ref": "#/components/schemas/UserOut"
          },
          "workspace_id": {
            "type": "string"
          }
        },
        "required": [
          "user"
        ],
        "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"
      },
      "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"
      },
      "TotpCodeInBody": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "maxLength": 20,
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "TotpDisableInBody": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "maxLength": 20,
            "type": "string"
          },
          "password": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "password",
          "code"
        ],
        "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"
      },
      "TwoFactorInBody": {
        "additionalProperties": false,
        "properties": {
          "challenge": {
            "type": "string"
          },
          "code": {
            "description": "Authenticator code or a recovery code",
            "maxLength": 20,
            "type": "string"
          }
        },
        "required": [
          "challenge",
          "code"
        ],
        "type": "object"
      },
      "UpdateAPIInBody": {
        "additionalProperties": false,
        "properties": {
          "accent_color": {
            "maxLength": 7,
            "type": "string"
          },
          "api_base_url": {
            "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"
          },
          "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"
          },
          "payg_enabled": {
            "type": "boolean"
          },
          "plans_enabled": {
            "type": "boolean"
          },
          "price_per_request_micro": {
            "format": "int64",
            "maximum": 100000000,
            "minimum": 0,
            "type": "integer"
          },
          "privacy_url": {
            "maxLength": 300,
            "type": "string"
          },
          "rps": {
            "format": "int32",
            "maximum": 100000,
            "minimum": 0,
            "type": "integer"
          },
          "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"
          },
          "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"
      },
      "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"
      },
      "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"
      },
      "UserOut": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_admin": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "two_factor": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "is_admin",
          "two_factor",
          "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"
      },
      "WorkspaceDetail": {
        "additionalProperties": false,
        "properties": {
          "api_count": {
            "format": "int32",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "teams_allowed": {
            "description": "Inviting teammates needs an API on a plan that includes teams",
            "type": "boolean"
          }
        },
        "required": [
          "teams_allowed",
          "id",
          "name",
          "role",
          "api_count",
          "created_at"
        ],
        "type": "object"
      },
      "WorkspaceOut": {
        "additionalProperties": false,
        "properties": {
          "api_count": {
            "format": "int32",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "api_count",
          "created_at"
        ],
        "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": "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/apis/{id}": {
      "delete": {
        "operationId": "delete-apis-id",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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 API",
        "tags": [
          "APIs"
        ],
        "x-order": 37
      },
      "get": {
        "operationId": "get-apis-id",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get an API",
        "tags": [
          "APIs"
        ],
        "x-order": 35
      },
      "patch": {
        "operationId": "patch-apis-id",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAPIInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Update an API's settings",
        "tags": [
          "APIs"
        ],
        "x-order": 36
      }
    },
    "/api/v1/apis/{id}/connection": {
      "get": {
        "operationId": "get-apis-id-connection",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": [
          "APIs"
        ],
        "x-order": 45
      }
    },
    "/api/v1/apis/{id}/customers": {
      "get": {
        "operationId": "get-apis-id-customers",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 54
      }
    },
    "/api/v1/apis/{id}/customers/export": {
      "get": {
        "operationId": "get-apis-id-customers-export",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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/apis/{id}/customers/invite": {
      "post": {
        "operationId": "post-apis-id-customers-invite",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 55
      }
    },
    "/api/v1/apis/{id}/customers/{customer}": {
      "delete": {
        "operationId": "delete-apis-id-customers-customer",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 58
      },
      "get": {
        "operationId": "get-apis-id-customers-customer",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 56
      },
      "patch": {
        "description": "Approve a pending customer with status active. Suspending blocks the customer's keys within a minute.",
        "operationId": "patch-apis-id-customers-customer",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 57
      }
    },
    "/api/v1/apis/{id}/customers/{customer}/credits": {
      "post": {
        "description": "Use this to sell credit outside Stripe. Pass ref to make the call safe to retry.",
        "operationId": "post-apis-id-customers-customer-credits",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 60
      }
    },
    "/api/v1/apis/{id}/customers/{customer}/keys/{key}": {
      "delete": {
        "operationId": "delete-apis-id-customers-customer-keys-key",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 63
      }
    },
    "/api/v1/apis/{id}/customers/{customer}/ledger": {
      "get": {
        "operationId": "get-apis-id-customers-customer-ledger",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 61
      }
    },
    "/api/v1/apis/{id}/customers/{customer}/limits": {
      "put": {
        "description": "Custom limits beat the customer's plan and the API defaults. null inherits.",
        "operationId": "put-apis-id-customers-customer-limits",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 59
      }
    },
    "/api/v1/apis/{id}/customers/{customer}/usage": {
      "get": {
        "operationId": "get-apis-id-customers-customer-usage",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 62
      }
    },
    "/api/v1/apis/{id}/domain": {
      "delete": {
        "operationId": "delete-apis-id-domain",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Remove the custom domain",
        "tags": [
          "APIs"
        ],
        "x-order": 49
      },
      "put": {
        "operationId": "put-apis-id-domain",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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/ApiOut"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Set a custom portal domain",
        "tags": [
          "APIs"
        ],
        "x-order": 47
      }
    },
    "/api/v1/apis/{id}/domain/check": {
      "post": {
        "operationId": "post-apis-id-domain-check",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API ID",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOut"
                }
              }
            },
            "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": [
          "APIs"
        ],
        "x-order": 48
      }
    },
    "/api/v1/apis/{id}/ledger": {
      "get": {
        "operationId": "get-apis-id-ledger",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 64
      }
    },
    "/api/v1/apis/{id}/logo": {
      "delete": {
        "operationId": "delete-apis-id-logo",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": [
          "APIs"
        ],
        "x-order": 39
      },
      "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-apis-id-logo",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API ID",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Content-Type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "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": [
          "APIs"
        ],
        "x-order": 38
      }
    },
    "/api/v1/apis/{id}/plan": {
      "post": {
        "description": "Returns a Stripe Checkout address for a first paid plan. Changes between paid plans and moves to Free apply right away.",
        "operationId": "post-apis-id-plan",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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 API's MicroAuth plan",
        "tags": [
          "MicroAuth plan"
        ],
        "x-order": 70
      }
    },
    "/api/v1/apis/{id}/plans": {
      "get": {
        "operationId": "get-apis-id-plans",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 50
      },
      "post": {
        "operationId": "post-apis-id-plans",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 51
      }
    },
    "/api/v1/apis/{id}/plans/{plan}": {
      "delete": {
        "description": "Plans with subscribers are archived instead: they stay on the plan but nobody new can pick it.",
        "operationId": "delete-apis-id-plans-plan",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 53
      },
      "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-apis-id-plans-plan",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 52
      }
    },
    "/api/v1/apis/{id}/secret": {
      "get": {
        "operationId": "get-apis-id-secret",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": [
          "APIs"
        ],
        "x-order": 40
      }
    },
    "/api/v1/apis/{id}/secret/rotate": {
      "post": {
        "operationId": "post-apis-id-secret-rotate",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": [
          "APIs"
        ],
        "x-order": 41
      }
    },
    "/api/v1/apis/{id}/stats": {
      "get": {
        "operationId": "get-apis-id-stats",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": [
          "APIs"
        ],
        "x-order": 46
      }
    },
    "/api/v1/apis/{id}/stripe": {
      "delete": {
        "description": "Card payments stop right away. Existing subscriptions keep running in Stripe until you cancel them there.",
        "operationId": "delete-apis-id-stripe",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 68
      }
    },
    "/api/v1/apis/{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-apis-id-stripe-connect",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 65
      }
    },
    "/api/v1/apis/{id}/stripe/refresh": {
      "post": {
        "operationId": "post-apis-id-stripe-refresh",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": 67
      }
    },
    "/api/v1/apis/{id}/test-credit": {
      "post": {
        "operationId": "post-apis-id-test-credit",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": [
          "APIs"
        ],
        "x-order": 44
      }
    },
    "/api/v1/apis/{id}/test-key": {
      "get": {
        "operationId": "get-apis-id-test-key",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": [
          "APIs"
        ],
        "x-order": 42
      }
    },
    "/api/v1/apis/{id}/test-key/regenerate": {
      "post": {
        "operationId": "post-apis-id-test-key-regenerate",
        "parameters": [
          {
            "description": "API ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "API 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": [
          "APIs"
        ],
        "x-order": 43
      }
    },
    "/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": 10
      }
    },
    "/api/v1/auth/invites/{token}/accept": {
      "post": {
        "operationId": "post-auth-invites-token-accept",
        "parameters": [
          {
            "in": "cookie",
            "name": "ma_session",
            "schema": {
              "type": "string"
            }
          },
          {
            "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": 11
      }
    },
    "/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 factor authentication",
        "tags": [
          "Auth"
        ],
        "x-order": 5
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "post-auth-logout",
        "parameters": [
          {
            "in": "cookie",
            "name": "ma_session",
            "schema": {
              "type": "string"
            }
          }
        ],
        "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": 6
      }
    },
    "/api/v1/auth/password/forgot": {
      "post": {
        "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": 7
      }
    },
    "/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": 9
      }
    },
    "/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": 8
      }
    },
    "/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.",
        "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": {
      "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": 12
      },
      "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": 13
      }
    },
    "/api/v1/me/2fa/disable": {
      "post": {
        "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 factor authentication",
        "tags": [
          "Account"
        ],
        "x-order": 17
      }
    },
    "/api/v1/me/2fa/enable": {
      "post": {
        "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 factor authentication",
        "tags": [
          "Account"
        ],
        "x-order": 16
      }
    },
    "/api/v1/me/2fa/recovery-codes": {
      "post": {
        "operationId": "post-me-2fa-recovery-codes",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TotpDisableInBody"
              }
            }
          },
          "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": "Replace recovery codes",
        "tags": [
          "Account"
        ],
        "x-order": 18
      }
    },
    "/api/v1/me/2fa/setup": {
      "post": {
        "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 factor setup",
        "tags": [
          "Account"
        ],
        "x-order": 15
      }
    },
    "/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": 14
      }
    },
    "/api/v1/platform-plans": {
      "get": {
        "operationId": "get-platform-plans",
        "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": 69
      }
    },
    "/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 a portal address",
        "tags": [
          "APIs"
        ],
        "x-order": 34
      }
    },
    "/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": 19
      }
    },
    "/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": 22
      },
      "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/WorkspaceDetail"
                }
              }
            },
            "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": 20
      },
      "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": 21
      }
    },
    "/api/v1/workspaces/{wid}/apis": {
      "get": {
        "operationId": "get-workspaces-wid-apis",
        "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/ApiSummary"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List APIs",
        "tags": [
          "APIs"
        ],
        "x-order": 32
      },
      "post": {
        "operationId": "post-workspaces-wid-apis",
        "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/CreateAPIInBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedAPIBody"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Launch an API",
        "tags": [
          "APIs"
        ],
        "x-order": 33
      }
    },
    "/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 API",
            "explode": false,
            "in": "query",
            "name": "api_id",
            "schema": {
              "description": "Only events for this API",
              "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",
            "explode": false,
            "in": "query",
            "name": "action",
            "schema": {
              "description": "Action prefix, for example customer. or key.revoked",
              "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": 31
      }
    },
    "/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 API",
            "explode": false,
            "in": "query",
            "name": "api_id",
            "schema": {
              "description": "Only events for this API",
              "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",
            "explode": false,
            "in": "query",
            "name": "action",
            "schema": {
              "description": "Action prefix, for example customer. or key.revoked",
              "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": 71
      }
    },
    "/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": 24
      }
    },
    "/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": 25
      }
    },
    "/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": 28
      },
      "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": 29
      }
    },
    "/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": 30
      }
    },
    "/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": 23
      }
    },
    "/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": 27
      },
      "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": 26
      }
    },
    "/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": 83
      }
    },
    "/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": 82
      }
    },
    "/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": 84
      }
    }
  },
  "servers": [
    {
      "url": "https://microauth.com"
    }
  ]
}
