Brume · Docs
API

Authentification

Référence OpenAPI générée pour le domaine « Authentification ».

POST
/api/auth/accept-invite

Create the invited user and membership, then return a tenant callback URL.

Assigned workspaces are activated, a welcome email is sent, and the invitation is marked as accepted.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/accept-invite" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "name": "string",    "password": "string",    "token": "string"  }'
{  "redirect_url": "string"}
POST
/api/auth/create-org

Create a tenant, admin membership, and private workspace for the current user.

The response includes a tenant session JWT and one-time callback code.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/create-org" \  -H "Content-Type: application/json" \  -d '{    "org_name": "string",    "org_slug": "string"  }'
{  "code": "string",  "redirect_url": "string",  "tenant_slug": "string",  "token": "string"}
POST
/api/auth/exchange-code

Create a one-time tenant authentication code from a hub session.

The user must have tenant or guest access and satisfy the tenant SSO policy.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/exchange-code" \  -H "Content-Type: application/json" \  -d '{    "tenant_slug": "string"  }'
{  "code": "string",  "redirect_url": "string"}
POST
/api/auth/forgot-password

Invalidate prior reset codes and email a new two-hour code when the user exists.

The response never reveals whether the submitted email is registered.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/forgot-password" \  -H "Content-Type: application/json" \  -d '{    "email": "string"  }'
{}
POST
/api/auth/hub-code

Create a one-time hub authentication code from a local tenant session.

SSO-authenticated tenant sessions cannot be promoted to hub sessions.

Response Body

application/json

curl -X POST "https://example.com/api/auth/hub-code"
{  "code": "string"}
GET
/api/auth/invitations/{token}

Return public invitation context for a pending token or raise 404.

Path Parameters

token*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/auth/invitations/string"
{  "email": "string",  "invited_by_name": "string",  "role": "string",  "status": "string",  "tenant_name": "string",  "tenant_slug": "string"}
POST
/api/auth/login

Authenticate a global hub user or tenant-scoped user and return a session JWT.

Tenant-scoped login is restricted to requests from the internal proxy.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/login" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "password": "string"  }'
{  "status": "string",  "tenant_count": 0,  "tenant_name": "string",  "tenants": [    {      "name": "string",      "role": "member",      "slug": "string",      "status": "active"    }  ],  "token": "string"}
POST
/api/auth/logout

Increment the user's token version to revoke every active session.

The logout and token revocation are recorded in the audit journal.

Response Body

application/json

curl -X POST "https://example.com/api/auth/logout"
{}
GET
/api/auth/me/tenants

Return active and pending tenant memberships for the authenticated user.

Response Body

application/json

curl -X GET "https://example.com/api/auth/me/tenants"
[  {    "name": "string",    "role": "member",    "slug": "string",    "status": "active"  }]
POST
/api/auth/redeem-code

Atomically consume an unexpired code and return its scoped session JWT.

Tenant SSO policy and authentication provenance are preserved during exchange.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/redeem-code" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "token": "string"}
POST
/api/auth/register

Create a global user, tenant, admin membership, and private workspace.

This legacy combined registration flow returns a tenant-scoped session JWT.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/register" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "name": "string",    "org_name": "string",    "org_slug": "string",    "password": "string"  }'
{  "tenant_slug": "string",  "token": "string"}
POST
/api/auth/request-access

Create a pending tenant membership or return the existing membership status.

New requests are audited and emailed to active tenant administrators.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/request-access" \  -H "Content-Type: application/json" \  -d '{    "tenant_slug": "string"  }'
{  "status": "string",  "tenant_name": "string"}
POST
/api/auth/reset-password

Set a new password with a valid reset code and revoke existing sessions.

The reset code is marked as used after the password is changed.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/reset-password" \  -H "Content-Type: application/json" \  -d '{    "code": "string",    "email": "string",    "new_password": "string"  }'
null
POST
/api/auth/signup

Create a global account and return a hub-scoped session JWT.

A valid invite code is required when signup invite gating is enabled.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/signup" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "name": "string",    "password": "string"  }'
{  "token": "string",  "user_id": "string"}
POST
/api/auth/tenant-register

Register an invited user in an existing tenant and return its session state.

The route is restricted to the internal proxy and notifies tenant admins.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/tenant-register" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "name": "string",    "password": "string",    "tenant_slug": "string"  }'
{  "status": "string",  "tenant_name": "string",  "token": "string"}
POST
/api/auth/verify-invite

Check a signup code against invite gating without consuming it.

Every code is accepted when invite gating is disabled.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/verify-invite" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "valid": true}