{
  "openapi": "3.1.0",
  "info": {
    "title": "authiane.com website API",
    "version": "1.1.0",
    "summary": "Early-access waitlist, status probe and OAuth-protected waitlist statistics",
    "description": "The public website of Authiane exposes a small API. Without authentication: joining the early-access waitlist and a status probe. With OAuth 2.0 client credentials (RFC 6749 section 4.4) and the scope waitlist:stats:read: aggregate waitlist statistics (counts only, no personal data). Authorization server metadata: https://www.authiane.com/.well-known/oauth-authorization-server (RFC 8414); protected resource metadata: https://www.authiane.com/.well-known/oauth-protected-resource/api/v1 (RFC 9728). Production clients are issued by Das Digitale Momentum on request. Sandbox: the same contract under https://www.authiane.com/sandbox stores nothing, returns fixed example statistics and accepts the public OAuth client sandbox/sandbox, so agents can test every call without credentials. Access tokens are JWTs valid for 900 seconds. Versioning: the major version is part of the path (/api/v1/); breaking changes only appear under a new major path; deprecated operations are flagged and keep working. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call, announced with RateLimit-* headers. Errors: every error response is typed as Error {error, message}; the token endpoint answers with OAuthError {error, error_description} (RFC 6749 section 5.2). Submit an address only with the explicit consent of its owner.",
    "contact": {
      "name": "Das Digitale Momentum GmbH & Co. KG",
      "email": "info@ddm-it.de",
      "url": "https://www.authiane.com/contact/"
    }
  },
  "externalDocs": {
    "description": "Developer notes and agent guidance",
    "url": "https://www.authiane.com/developers/"
  },
  "servers": [
    {
      "url": "https://www.authiane.com",
      "description": "Production"
    },
    {
      "url": "https://www.authiane.com/sandbox",
      "description": "Sandbox: same contract, nothing is stored, fixed example statistics; OAuth client_id and client_secret are both \"sandbox\"."
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "waitlist",
      "description": "Early-access waitlist"
    },
    {
      "name": "oauth",
      "description": "OAuth 2.0 client credentials"
    },
    {
      "name": "meta",
      "description": "Service status and discovery"
    }
  ],
  "paths": {
    "/api/v1/status": {
      "get": {
        "operationId": "getStatus",
        "tags": [
          "meta"
        ],
        "summary": "Service status and discovery links",
        "description": "Zero-auth probe that confirms the API is up, names the environment and points to the documentation and this specification.",
        "security": [],
        "responses": {
          "200": {
            "description": "Service is up.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and HEAD are allowed. Error codes: method_not_allowed.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, HEAD"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call. Error codes: rate_limited.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error. Error codes: internal_error.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/oauth/token": {
      "post": {
        "operationId": "createAccessToken",
        "tags": [
          "oauth"
        ],
        "summary": "Issue an access token (client credentials grant)",
        "description": "Exchanges client credentials for a Bearer access token. Authenticate the client with HTTP Basic (client_secret_basic) or with client_id and client_secret in the form body (client_secret_post). Omitting scope grants all scopes of the client. Responses are never cached.",
        "security": [
          {
            "clientSecretBasic": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              },
              "examples": {
                "sandbox": {
                  "summary": "Public sandbox client",
                  "value": {
                    "grant_type": "client_credentials",
                    "client_id": "sandbox",
                    "client_secret": "sandbox",
                    "scope": "waitlist:stats:read"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Access token issued.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing or unsupported grant type, wrong content type or unknown scope. OAuth error codes: invalid_request, unsupported_grant_type, invalid_scope.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          },
          "401": {
            "description": "Client authentication failed. OAuth error codes: invalid_client.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "WWW-Authenticate": {
                "description": "Basic challenge when HTTP Basic client authentication was used.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          },
          "405": {
            "description": "Only POST is allowed. Error codes: method_not_allowed.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than 64 KB. Error codes: payload_too_large.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call. Error codes: rate_limited.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error. Error codes: internal_error.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/waitlist": {
      "post": {
        "operationId": "joinWaitlist",
        "tags": [
          "waitlist"
        ],
        "summary": "Join the early-access waitlist",
        "description": "Stores an e-mail address with its consent timestamp and answers synchronously. No authentication. The same address can be submitted again; optional answers are merged. The response is identical for new and known addresses. Form-encoded submissions (no JavaScript) are redirected to a thanks page instead of receiving JSON. In the sandbox nothing is stored.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistSignup"
              },
              "examples": {
                "signup": {
                  "summary": "Sign-up with consent from the start page",
                  "value": {
                    "email": "you@company.com",
                    "consent": true,
                    "source": "hero",
                    "lang": "en"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistSignup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored, updated or already known.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "303": {
            "description": "Form-encoded submission accepted; redirect to /thanks/ or /de/danke/.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Unknown field, invalid enum value or malformed JSON. Error codes: invalid_request, invalid_json.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only POST is allowed. Error codes: method_not_allowed.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than 64 KB. Error codes: payload_too_large.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type is neither application/json nor application/x-www-form-urlencoded. Error codes: unsupported_media_type.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid e-mail address or consent not given. Error codes: invalid_email, consent_required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call. Error codes: rate_limited.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error. Error codes: internal_error.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/waitlist/stats": {
      "get": {
        "operationId": "getWaitlistStats",
        "tags": [
          "waitlist"
        ],
        "summary": "Aggregate waitlist statistics",
        "description": "Total sign-ups, sign-ups in the last 7 and 30 days, and counts by language, role, use case and form. Contains no e-mail addresses or other personal data. Requires an access token with the scope waitlist:stats:read issued for this environment.",
        "security": [
          {
            "oauth2": [
              "waitlist:stats:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Current statistics.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaitlistStats"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token. Error codes: unauthorized, invalid_token.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "WWW-Authenticate": {
                "description": "Bearer challenge (RFC 6750) with resource_metadata pointing to the protected resource metadata (RFC 9728).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The access token lacks the scope waitlist:stats:read. Error codes: insufficient_scope.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "WWW-Authenticate": {
                "description": "Bearer challenge (RFC 6750) with resource_metadata pointing to the protected resource metadata (RFC 9728).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and HEAD are allowed. Error codes: method_not_allowed.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET, HEAD"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call. Error codes: rate_limited.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error. Error codes: internal_error.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/waitlist": {
      "post": {
        "operationId": "joinWaitlistLegacy",
        "tags": [
          "waitlist"
        ],
        "summary": "Join the waitlist (unversioned alias)",
        "description": "Unversioned alias of POST /api/v1/waitlist kept for compatibility with existing forms. Prefer the versioned path.",
        "deprecated": true,
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistSignup"
              },
              "examples": {
                "signup": {
                  "summary": "Sign-up with consent from the start page",
                  "value": {
                    "email": "you@company.com",
                    "consent": true,
                    "source": "hero",
                    "lang": "en"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistSignup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored, updated or already known.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "303": {
            "description": "Form-encoded submission accepted; redirect to /thanks/ or /de/danke/.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Unknown field, invalid enum value or malformed JSON. Error codes: invalid_request, invalid_json.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only POST is allowed. Error codes: method_not_allowed.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than 64 KB. Error codes: payload_too_large.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type is neither application/json nor application/x-www-form-urlencoded. Error codes: unsupported_media_type.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid e-mail address or consent not given. Error codes: invalid_email, consent_required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call. Error codes: rate_limited.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error. Error codes: internal_error.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed in the current window. Rate limits: 120 requests per minute per client for GET and HEAD on /api/v1/status and for every sandbox call, 30 for every other call.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-API-Version": {
                "description": "Major API version of the responding server.",
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.0 client credentials. Discovery: https://www.authiane.com/.well-known/oauth-authorization-server.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://www.authiane.com/api/v1/oauth/token",
            "scopes": {
              "waitlist:stats:read": "Read aggregate waitlist statistics (counts only, no personal data)."
            }
          }
        }
      },
      "clientSecretBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "Client authentication at the token endpoint: client_id and client_secret."
      }
    },
    "schemas": {
      "WaitlistSignup": {
        "type": "object",
        "required": [
          "email",
          "consent"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "description": "E-mail address of the person joining; stored lower-cased."
          },
          "consent": {
            "type": "boolean",
            "const": true,
            "description": "Must be true: the person agreed to be notified when Authiane opens."
          },
          "source": {
            "type": "string",
            "enum": [
              "hero",
              "cta"
            ],
            "description": "Optional: which form on the site was used."
          },
          "lang": {
            "type": "string",
            "enum": [
              "en",
              "de"
            ],
            "default": "en",
            "description": "Optional: language for the notification."
          }
        }
      },
      "Accepted": {
        "type": "object",
        "required": [
          "accepted"
        ],
        "additionalProperties": false,
        "properties": {
          "accepted": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "Status": {
        "type": "object",
        "required": [
          "status",
          "service",
          "apiVersion",
          "environment",
          "time",
          "docs",
          "openapi"
        ],
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          },
          "service": {
            "type": "string",
            "const": "authiane-web"
          },
          "apiVersion": {
            "type": "string",
            "const": "1"
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "sandbox"
            ]
          },
          "time": {
            "type": "string",
            "format": "date-time"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          },
          "openapi": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "WaitlistStats": {
        "type": "object",
        "required": [
          "total",
          "last7Days",
          "last30Days",
          "byLang",
          "byRole",
          "byBuilding",
          "bySource",
          "generatedAt",
          "environment"
        ],
        "additionalProperties": false,
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "last7Days": {
            "type": "integer",
            "minimum": 0
          },
          "last30Days": {
            "type": "integer",
            "minimum": 0
          },
          "byLang": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Counts per value; missing answers are counted as unknown."
          },
          "byRole": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Counts per value; missing answers are counted as unknown."
          },
          "byBuilding": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Counts per value; missing answers are counted as unknown."
          },
          "bySource": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Counts per value; missing answers are counted as unknown."
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "sandbox"
            ]
          }
        }
      },
      "TokenRequest": {
        "type": "object",
        "required": [
          "grant_type"
        ],
        "properties": {
          "grant_type": {
            "type": "string",
            "const": "client_credentials"
          },
          "scope": {
            "type": "string",
            "description": "Space-separated scopes: waitlist:stats:read."
          },
          "client_id": {
            "type": "string",
            "description": "Only for client_secret_post."
          },
          "client_secret": {
            "type": "string",
            "description": "Only for client_secret_post."
          }
        }
      },
      "TokenResponse": {
        "type": "object",
        "required": [
          "access_token",
          "token_type",
          "expires_in",
          "scope"
        ],
        "additionalProperties": false,
        "properties": {
          "access_token": {
            "type": "string",
            "description": "JWT (HS256, typ at+jwt)."
          },
          "token_type": {
            "type": "string",
            "const": "Bearer"
          },
          "expires_in": {
            "type": "integer",
            "const": 900
          },
          "scope": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_request",
              "invalid_json",
              "invalid_email",
              "consent_required",
              "method_not_allowed",
              "payload_too_large",
              "unsupported_media_type",
              "rate_limited",
              "unauthorized",
              "invalid_token",
              "insufficient_scope",
              "not_found",
              "invalid_path",
              "forbidden",
              "internal_error"
            ],
            "description": "Machine-readable error code."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation."
          }
        }
      },
      "OAuthError": {
        "type": "object",
        "required": [
          "error"
        ],
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_request",
              "invalid_client",
              "unsupported_grant_type",
              "invalid_scope"
            ],
            "description": "OAuth 2.0 error code (RFC 6749 section 5.2)."
          },
          "error_description": {
            "type": "string",
            "description": "Human-readable explanation."
          }
        }
      }
    }
  }
}
