6 endpoints. Send your API key as Authorization: Bearer <key> on each request; see The API and AI assistants for keys, errors, idempotency and the conventions every endpoint shares.
GET /api/organisation/sso
The organisation's single sign-on settings (admins and owners); the client secret is never returned
Responses:
| Status | Meaning |
|---|---|
| 200 | enabled, issuer, client_id, has_secret, plan_allows, redirect_uri (register it at your identity provider), sign_in_url and updated_at |
| 401 | Missing or invalid API key (Error) |
| 403 | Not an admin or owner |
PUT /api/organisation/sso
Save the identity provider's issuer, client id and client secret, and switch it on or off (admins and owners, signed in to the web app)
OpenID Connect. The issuer must be a public https address. The client secret is needed the first time, stored encrypted and never shown again; leave it out to keep it. Changing the issuer removes every member's link, because a new identity provider's user ids differ. Logged in the activity without the secret.
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
issuer | string | Yes | For example https://login.microsoftonline.com/<tenant>/v2.0. |
client_id | string | Yes | |
client_secret | string | No | Needed the first time; 8 to 500 characters. |
enabled | boolean | No |
Responses:
| Status | Meaning |
|---|---|
| 200 | The settings |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 403 | Not an admin or owner, not signed in to the web app, or the organisation's plan does not include single sign-on (it is included in the Team plan) |
DELETE /api/organisation/sso
Remove the settings and every member's link (admins and owners, signed in to the web app)
Responses:
| Status | Meaning |
|---|---|
| 204 | Removed |
| 401 | Missing or invalid API key (Error) |
| 403 | Not an admin or owner |
GET /api/me/sso
Whether the organisation you have open offers single sign-on, and your link (a masked email and dates)
Responses:
| Status | Meaning |
|---|---|
| 200 | available, plan_allows (whether the organisation's plan includes single sign-on: Team) and link (null when not linked) |
| 401 | Missing or invalid API key (Error) |
DELETE /api/me/sso
Remove your link (your current password is asked); your password keeps working
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
current_password | string | Yes |
Responses:
| Status | Meaning |
|---|---|
| 204 | Removed |
| 401 | Missing or invalid API key (Error) |
| 404 | Item (or its parent) does not exist (Error) |
POST /api/me/sso/link
Start linking your identity-provider account for the organisation you have open (signed in to the web app; your current password is asked)
Send the browser to the returned url. After you sign in there, you come back to Your account. Later, sign in at the organisation's sign_in_url. An email address is never used to find or merge accounts.
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
current_password | string | Yes |
Responses:
| Status | Meaning |
|---|---|
| 200 | url: the identity provider's sign-in address |
| 401 | Missing or invalid API key (Error) |
| 403 | Not signed in to the web app, or the organisation's plan does not include single sign-on (it is included in the Team plan) |
| 404 | Single sign-on is not on for this organisation |