LynceaAPI

Create additional organisation

Crée une nouvelle organisation pour le user authentifié — il en devient owner. Le slug est dérivé du nom server-side ; en cas de collision, un suffixe aléatoire est tenté. La réponse re-mint l'access token et le refresh cookie sur la nouvelle organisation (auto-switch).

POST
/api/v1/auth/tenants
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.monitoring.crahe-arthur.com/api/v1/auth/tenants" \  -H "Content-Type: application/json" \  -d '{    "name": "Acme Production"  }'
{
  "accessToken": "eyJhbGciOi...",
  "user": {
    "linkedProviders": [
      "google"
    ],
    "id": "018f7b9a-57dd-4748-9e13-6e3e3e5b9eaf",
    "email": "admin@acme.example",
    "fullName": "Arthur Crahé",
    "hasPassword": true
  },
  "tenant": {
    "id": "018f7b9a-6f8d-4c1d-8d72-1bbecdadc101",
    "slug": "acme-monitoring",
    "orgRole": "owner"
  }
}