AimableDocs
DocsAPI ReferenceRelease Notes
POST/v1/auth/switch-tenant

Switch Tenant

Switch to a different tenant. Returns a new session token scoped to that tenant and rotates the auth cookie so subsequent requests carry the new token.

Headers

NameTypeRequiredDescription
X-API-KeystringOptional

Request Body

application/jsonRequired
tenant_idstringRequired
Authentication
X-API-Key: ak.<key_id>.<secret>Authentication & errors →

Request

curl -X POST '/api/v1/auth/switch-tenant' \
  -H 'X-API-Key: ak.<key_id>.<secret>' \
  -H 'Content-Type: application/json' \
  -d '{
  "tenant_id": "string"
}'

Response

200

No response body documented

Error Responses