Railhook Authentication API

User registration, login, and session management

GitHub OpenAPI

Operations 26

PUT /api/v1/auth/profile Update profile #
POST /api/v1/auth/verify-email Verify email #
POST /api/v1/auth/switch-organization Switch organization #
POST /api/v1/auth/sessions/revoke-all Sign out everywhere #
POST /api/v1/auth/reset-password Reset password #
POST /api/v1/auth/resend-verification Resend verification email #
POST /api/v1/auth/register Register new user #
POST /api/v1/auth/refresh Refresh token #
POST /api/v1/auth/oauth/exchange Exchange a sign-in code #
POST /api/v1/auth/logout Logout #
POST /api/v1/auth/login Login #
POST /api/v1/auth/forgot-password Forgot password #
GET /api/v1/auth/email-change Get the email change state #
POST /api/v1/auth/email-change Change email #
DELETE /api/v1/auth/email-change Cancel the pending email change #
POST /api/v1/auth/email-change/resend Resend the email change confirmation #
POST /api/v1/auth/email-change/confirm Confirm an email change #
POST /api/v1/auth/email-change/cancel Cancel an email change from the old address #
POST /api/v1/auth/change-password Change password #
GET /api/v1/auth/sessions List active sessions #
GET /api/v1/auth/providers List sign-in providers #
GET /api/v1/auth/oauth/google/start Start signing in with Google #
GET /api/v1/auth/oauth/google/callback Google sign-in callback #
GET /api/v1/auth/me Get current user #
DELETE /api/v1/auth/me Erase your account #
DELETE /api/v1/auth/sessions/{sessionId} Revoke a session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/railhook-io:railhook-io-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

railhook-io-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Railhook Authentication API
  description: 'Send webhooks to the endpoints your customers register, and receive webhooks from any provider, with every attempt on record.


    ## What you can do

    - **Outgoing**: post an event once; Railhook delivers it, signed, to every subscribed endpoint and retries on its own (1m → 24h, 7 attempts). What never arrives lands in Failed Messages.

    - **Incoming**: give each provider its own ingress URL; Railhook verifies the signature and forwards the event to your destinations.

    - **Replay**: send past events again with Time Machine.


    ## Authentication

    - **API key** (`X-API-Key` header): project-scoped calls, including sending events. What the SDKs use.

    - **Bearer token**: account and organization calls made on behalf of a signed-in user.

    - **Portal session** (`Authorization: Bearer rhp_…`): the `/api/v1/portal/**` calls the embedded customer portal makes for one Consumer. Opened by your backend with an API key.


    Guides: /docs/'
  contact:
    name: Railhook
    url: https://github.com/vadymkykalo/railhook
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.0.0
servers:
- url: '{baseUrl}'
  description: Your Railhook installation — the same origin the dashboard runs on
  variables:
    baseUrl:
      description: Scheme and host of your installation, without a trailing slash
      default: http://localhost:8080
security:
- bearerAuth: []
tags:
- name: Authentication
  description: User registration, login, and session management
paths:
  /api/v1/auth/profile:
    put:
      tags:
      - Authentication
      summary: Update profile
      description: Updates the authenticated user's profile information
      operationId: updateProfile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProfileRequest'
        required: true
      responses:
        '200':
          description: Profile updated successfully
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/UserResponse'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
  /api/v1/auth/verify-email:
    post:
      tags:
      - Authentication
      summary: Verify email
      description: Verifies user email with the token sent to their email
      operationId: verifyEmail
      parameters:
      - name: token
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Email verified successfully
        '400':
          description: Invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/switch-organization:
    post:
      tags:
      - Authentication
      summary: Switch organization
      description: Re-issues an access token scoped to another organization the caller belongs to. The refresh token is untouched and no other session is affected; the new token's role comes from the membership in the target organization, not from the token being replaced.
      operationId: switchOrganization
      parameters:
      - name: refresh_token
        in: cookie
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwitchOrganizationRequest'
        required: true
      responses:
        '200':
          description: Access token re-issued for the target organization
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          description: Not authenticated, or no live session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Caller is not a member of that organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
  /api/v1/auth/sessions/revoke-all:
    post:
      tags:
      - Authentication
      summary: Sign out everywhere
      description: Ends every session for the authenticated user, including the one making the call.
      operationId: revokeAllSessions
      responses:
        '204':
          description: All sessions revoked
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
  /api/v1/auth/reset-password:
    post:
      tags:
      - Authentication
      summary: Reset password
      description: Resets user password using the token from the reset email
      operationId: resetPassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResetPasswordRequest'
        required: true
      responses:
        '200':
          description: Password reset successfully
        '400':
          description: Invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/resend-verification:
    post:
      tags:
      - Authentication
      summary: Resend verification email
      description: Sends a new verification email to the user
      operationId: resendVerification
      parameters:
      - name: email
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Verification email sent
        '400':
          description: Email already verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/register:
    post:
      tags:
      - Authentication
      summary: Register new user
      description: Creates a new user account and organization
      operationId: register
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
        required: true
      responses:
        '201':
          description: User registered successfully
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '400':
          description: Invalid request or email already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/refresh:
    post:
      tags:
      - Authentication
      summary: Refresh token
      description: Exchanges a valid refresh token for new access and refresh tokens
      operationId: refreshToken
      parameters:
      - name: refresh_token
        in: cookie
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenRequest'
      responses:
        '200':
          description: Tokens refreshed successfully
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          description: Invalid or expired refresh token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/oauth/exchange:
    post:
      tags:
      - Authentication
      summary: Exchange a sign-in code
      description: 'Trades the one-time code the Google sign-in callback put in the dashboard''s URL for the same session a password sign-in returns: the access token in the body, the refresh token in its cookie. A code works once, within 60 seconds of the callback, and only in the browser the callback redirected: it must carry the `railhook_signin_handoff` cookie the callback set.'
      operationId: exchangeSignInCode
      parameters:
      - name: railhook_signin_handoff
        in: cookie
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExchangeSignInCodeRequest'
        required: true
      responses:
        '200':
          description: Signed in
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          description: The code has been used, has expired, or was opened in another browser
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/logout:
    post:
      tags:
      - Authentication
      summary: Logout
      description: Revokes access and refresh tokens
      operationId: logout
      parameters:
      - name: refresh_token
        in: cookie
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogoutRequest'
      responses:
        '204':
          description: Logged out successfully
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
  /api/v1/auth/login:
    post:
      tags:
      - Authentication
      summary: Login
      description: Authenticates user and returns JWT token
      operationId: login
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: Login successful
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/forgot-password:
    post:
      tags:
      - Authentication
      summary: Forgot password
      description: Sends a password reset email to the user
      operationId: forgotPassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForgotPasswordRequest'
        required: true
      responses:
        '200':
          description: If the email exists, a reset link has been sent
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/email-change:
    get:
      tags:
      - Authentication
      summary: Get the email change state
      description: The account's address, and the change waiting for confirmation if there is one
      operationId: getEmailChange
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EmailChangeResponse'
      security:
      - bearerAuth: []
    post:
      tags:
      - Authentication
      summary: Change email
      description: An unverified account moves to the new address at once and must verify it; it answers the registration CAPTCHA when one is configured. A verified account re-enters its password (or, with no password, has signed in within 10 minutes) and keeps its address until the link sent to the new one is opened.
      operationId: requestEmailChange
      parameters:
      - name: refresh_token
        in: cookie
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeEmailRequest'
        required: true
      responses:
        '200':
          description: Changed, or waiting for confirmation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EmailChangeResponse'
        '400':
          description: Wrong password, failed CAPTCHA or invalid address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: A passwordless account has not signed in recently
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Email already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests or daily cap reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
    delete:
      tags:
      - Authentication
      summary: Cancel the pending email change
      operationId: cancelEmailChange
      responses:
        '200':
          description: OK
      security:
      - bearerAuth: []
  /api/v1/auth/email-change/resend:
    post:
      tags:
      - Authentication
      summary: Resend the email change confirmation
      operationId: resendEmailChange
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EmailChangeResponse'
      security:
      - bearerAuth: []
  /api/v1/auth/email-change/confirm:
    post:
      tags:
      - Authentication
      summary: Confirm an email change
      description: Opened from the link sent to the new address. Signs every session out.
      operationId: confirmEmailChange
      parameters:
      - name: token
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Email changed
        '400':
          description: Invalid, used or expired link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Email already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/email-change/cancel:
    post:
      tags:
      - Authentication
      summary: Cancel an email change from the old address
      description: Opened from the "this wasn't me" link sent to the old address. Signs every session out.
      operationId: cancelEmailChangeByToken
      parameters:
      - name: token
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
  /api/v1/auth/change-password:
    post:
      tags:
      - Authentication
      summary: Change password
      description: Changes the authenticated user's password
      operationId: changePassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
        required: true
      responses:
        '200':
          description: Password changed successfully
        '400':
          description: Current password incorrect or validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
  /api/v1/auth/sessions:
    get:
      tags:
      - Authentication
      summary: List active sessions
      description: Returns every live sign-in for the authenticated user — browser sessions and CLI device-code grants alike — with the session making the request flagged as current. No token material is returned.
      operationId: listSessions
      parameters:
      - name: refresh_token
        in: cookie
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Sessions returned
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SessionResponse'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
  /api/v1/auth/providers:
    get:
      tags:
      - Authentication
      summary: List sign-in providers
      description: Which identity providers the sign-in and registration pages offer on this deployment. Public, because the pages ask before anyone has signed in.
      operationId: providers
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SignInProvidersResponse'
  /api/v1/auth/oauth/google/start:
    get:
      tags:
      - Authentication
      summary: Start signing in with Google
      description: Redirects the browser to Google. Signs in the account the Google identity belongs to, and creates one — with its own organization — when there is none. `returnTo` is a path on this site to land on afterwards; anything else is replaced with the dashboard. Answers 404 when Google sign-in is not configured.
      operationId: startGoogleSignIn
      parameters:
      - name: intent
        in: query
        required: false
        schema:
          type: string
      - name: returnTo
        in: query
        required: false
        schema:
          type: string
      responses:
        '302':
          description: Redirect to Google
        '404':
          description: Google sign-in is not configured on this deployment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/oauth/google/callback:
    get:
      tags:
      - Authentication
      summary: Google sign-in callback
      description: Where Google returns the browser. Redirects to the dashboard's `/auth/callback` with a one-time code valid for 60 seconds, or back to the sign-in page with `error=google_…`. Tokens are never put in a URL.
      operationId: googleSignInCallback
      parameters:
      - name: code
        in: query
        required: false
        schema:
          type: string
      - name: state
        in: query
        required: false
        schema:
          type: string
      - name: error
        in: query
        required: false
        schema:
          type: string
      - name: railhook_oauth_state
        in: cookie
        required: false
        schema:
          type: string
      responses:
        '302':
          description: Redirect to the dashboard or back to the sign-in page
        '404':
          description: Google sign-in is not configured on this deployment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/auth/me:
    get:
      tags:
      - Authentication
      summary: Get current user
      description: Returns information about the authenticated user
      operationId: getCurrentUser
      responses:
        '200':
          description: User info returned
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CurrentUserResponse'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
    delete:
      tags:
      - Authentication
      summary: Erase your account
      description: 'GDPR Article 17. Permanently removes the personal data on the account and makes it unusable: the address is replaced with an unroutable one, the name is dropped, every session is closed and every membership is removed. Any organization you were the only member of is deleted with it, including every project, endpoint, event and delivery under it. This cannot be undone.


        Refused with 409 if you are the last owner of an organization that still has other members: hand it over first, or the people left behind can neither administer nor delete it.


        The audit log keeps a record that this happened. It names no contact details and is what lets the erasure be shown to have been carried out.'
      operationId: eraseOwnAccount
      responses:
        '204':
          description: Account erased
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Last owner of an organization that has other members
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
  /api/v1/auth/sessions/{sessionId}:
    delete:
      tags:
      - Authentication
      summary: Revoke a session
      description: Signs one device out. The session's refresh token stops working and so does the access token it already issued, rather than surviving until its own expiry.
      operationId: revokeSession
      parameters:
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Session revoked
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No such session for this user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
components:
  schemas:
    UpdateProfileRequest:
      type: object
      properties:
        fullName:
          type: string
          maxLength: 255
          minLength: 0
    SignInProvidersResponse:
      type: object
      properties:
        google:
          type: boolean
    ResetPasswordRequest:
      type: object
      properties:
        token:
          type: string
          minLength: 1
        newPassword:
          type: string
          maxLength: 128
          minLength: 8
          pattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&\-_#^()+=])[A-Za-z\d@$!%*?&\-_#^()+=]{8,}$
      required:
      - newPassword
      - token
    AuthResponse:
      type: object
      properties:
        accessToken:
          type: string
        refreshToken:
          type: string
        emailVerified:
          type: boolean
    OrganizationResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
    UserResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        email:
          type: string
        fullName:
          type: string
        status:
          type: string
          enum:
          - ACTIVE
          - PENDING_VERIFICATION
          - DISABLED
    LogoutRequest:
      type: object
      properties:
        refreshToken:
          type: string
    ExchangeSignInCodeRequest:
      type: object
      properties:
        code:
          type: string
          maxLength: 128
          minLength: 0
      required:
      - code
    CurrentUserResponse:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/UserResponse'
        organization:
          $ref: '#/components/schemas/OrganizationResponse'
        role:
          type: string
          enum:
          - OWNER
          - DEVELOPER
          - VIEWER
          - API_KEY
        emailDeliveryEnabled:
          type: boolean
        hasPassword:
          type: boolean
        platformAdmin:
          type: boolean
        demo:
          type: boolean
    SwitchOrganizationRequest:
      type: object
      properties:
        organizationId:
          type: string
          format: uuid
      required:
      - organizationId
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        status:
          type: integer
          format: int32
        fieldErrors:
          type: object
          additionalProperties:
            type: string
    RegisterRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          minLength: 1
        password:
          type: string
          maxLength: 128
          minLength: 8
          pattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&\-_#^()+=])[A-Za-z\d@$!%*?&\-_#^()+=]{8,}$
        fullName:
          type: string
          maxLength: 255
          minLength: 0
        organizationName:
          type: string
          maxLength: 100
          minLength: 2
        captchaToken:
          type: string
          maxLength: 4096
          minLength: 0
      required:
      - email
      - organizationName
      - password
    ForgotPasswordRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          minLength: 1
      required:
      - email
    ChangeEmailRequest:
      type: object
      properties:
        newEmail:
          type: string
          format: email
          maxLength: 255
          minLength: 0
        currentPassword:
          type: string
          maxLength: 128
          minLength: 0
        captchaToken:
          type: string
          maxLength: 4096
          minLength: 0
      required:
      - newEmail
    EmailChangeResponse:
      type: object
      properties:
        email:
          type: string
        pendingEmail:
          type: string
        pendingExpiresAt:
          type: string
          format: date-time
        applied:
          type: boolean
    RefreshTokenRequest:
      type: object
      properties:
        refreshToken:
          type: string
          minLength: 1
      required:
      - refreshToken
    LoginRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          minLength: 1
        password:
          type: string
          minLength: 1
      required:
      - email
      - password
    SessionResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        client:
          type: string
          enum:
          - WEB
          - CLI
        userAgent:
          type: string
        ipAddress:
          type: string
        createdAt:
          type: string
          format: date-time
        lastSeenAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        current:
          type: boolean
    ChangePasswordRequest:
      type: object
      properties:
        currentPassword:
          type: string
          minLength: 1
        newPassword:
          type: string
          maxLength: 128
          minLength: 8
          pattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&\-_#^()+=])[A-Za-z\d@$!%*?&\-_#^()+=]{8,}$
      required:
      - currentPassword
      - newPassword
  securitySchemes:
    bearerAuth:
      type: http
      description: JWT token obtained from /api/v1/auth/login
      scheme: bearer
      bearerFormat: JWT
    apiKey:
      type: apiKey
      description: Project API key for event ingestion
      name: X-API-Key
      in: header
    platformAdminToken:
      type: apiKey
      description: Cluster-operator credential (PLATFORM_ADMIN_TOKEN env var), independent of tenant org membership — required for cross-tenant admin endpoints
      name: X-Platform-Admin-Token
      in: header
    portalSession:
      type: http
      description: Portal session token, returned once by POST /api/v1/projects/{projectId}/consumers/{consumerId}/portal-sessions
      scheme: bearer
      bearerFormat: rhp_…