Identidad
Quién inició sesión y en qué organización.
GET /v1/capabilities
What this environment can do for my organization
Any signed-in member. Tells a client which optional features work in this environment, so it can hide or disable them instead of letting people try and fail. `assistant_builder.available` is `true` when the AI builder (`POST /v1/assistant-builder/messages`) has a model to run on for the caller's organization and `false` when it would answer `503` `builder_not_configured`. Asking does not send a message to the model and does not count against the builder's rate limit or budget. `answering_machine_detection.available` is `true` when the platform's audio detector of answering machines is deployed, so the `audio` voicemail detector of an assistant screens its outbound phone calls; `false` when that detector does nothing. 401 when the token is missing, expired or invalid; 403 with code `organization_suspended` when the organization is suspended; 503 when authentication is not available.
Respuestas
200Successful Response · CapabilitiesResponseNombre Tipo Requerido Descripción answering_machine_detectionAnsweringMachineDetectionCapabilityanswering_machine_detection.availablebooleansí assistant_builderBuilderCapabilitysí assistant_builder.availablebooleansí 401Missing, expired or invalid token. · ErrorResponse403Code `organization_suspended`: the organization is suspended. · ErrorResponse503Authentication is not available. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/invitations
Invite someone to my organization
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or `owner` invites an email address to their own organization with a role (`owner`, `admin`, `editor`, `viewer`); the identity provider sends the email. The organization is the one in the caller's access token. A role above the caller's own is 403, so only an `owner` can invite an `owner`. 401 when the token is missing, expired or invalid; 403 when the caller is below `admin` or asks for a role above their own; 409 when the email already has a pending invitation or is already a member (permanent, do not retry); 422 when the email or role is invalid; 429 when the organization sends too many invitations (see `Retry-After`); 503 when no identity provider, audit log or audit key is configured, or the provider cannot be reached (retry later). The invitation is recorded in the audit log as `invitation.create`, with the role; the email is not stored, only a keyed hash of it.
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
email | string | sí | |
role | string | sí | (owner, admin, editor, viewer) |
Respuestas
201Successful Response · InvitationResponseNombre Tipo Requerido Descripción emailstringsí rolestringsí (owner, admin, editor, viewer) 401Missing, expired or invalid token. · ErrorResponse403Role too low, or role above the caller's. · ErrorResponse409Already invited or already a member; do not retry. · ErrorResponse429Too many invitations; retry later. · ErrorResponse503Identity provider, audit log or audit key not available. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/me
The signed-in member
Send the identity provider's access token as `Authorization: Bearer <token>`. Returns the member's subject, tenant and role (`owner`, `admin`, `editor`, `viewer`) taken from the token's `sub`, `tenant_id` and `role` claims, and `organization_name`: the name of the member's organization (null when it is not known); `platform_admin`: whether the member is an admin of the platform (an owner or admin of the organization flagged `platform` in the identity provider). `can_view_costs` follows the membership’s signed `costs:read` permission. 401 when the token is missing, expired or invalid; 403 with code `organization_suspended` when the organization is suspended (every `/v1` call of its members and API keys answers so); 503 when no identity provider is configured or it cannot be reached.
Respuestas
200Successful Response · MeResponseNombre Tipo Requerido Descripción can_view_costsbooleanorganization_namestring | nullsí platform_adminbooleansí rolestringsí (owner, admin, editor, viewer) subjectstringsí tenant_idstring (uuid)sí 401Missing, expired or invalid token. · ErrorResponse403Code `organization_suspended`: the organization is suspended. · ErrorResponse503Identity provider not available. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/organizations
Create my organization
Sign-up: the signed-in user (a valid access token, which does not need a `tenant_id` yet) creates an organization and becomes its `owner`. The response carries the new tenant id; sign in again so the access token picks up `tenant_id` and `role`. After a 503 it is safe to send the same name again: the same user gets the same tenant id and no second organization is created. 401 when the token is missing, expired or invalid; 422 when the name is empty or longer than 120 characters; 429 when the caller signs up too often, or when too many sign-ups come from one client address (see `Retry-After`); 503 when no identity provider is configured or it cannot be reached, or when the rate-limit store cannot be reached.
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
name | string | sí |
Respuestas
201Successful Response · OrganizationResponseNombre Tipo Requerido Descripción namestringsí tenant_idstring (uuid)sí 401Missing, expired or invalid token. · ErrorResponse429Too many sign-ups from this account or this client address; retry later. · ErrorResponse503Identity provider or rate-limit store not available. · ErrorResponsedefaultDefault Response · ErrorResponse