For AI agents: a documentation index is available at https://docs.coverbase.com/llms.txt — this page is also available in markdown by appending .md to the URL.
The Users API provisions Coverbase accounts and manages their organization role and lifecycle. It is designed for identity-governance (SailPoint / IGA) integrations: the upstream system owns approval, this API creates the account + org membership so SSO can authenticate the user on first login.
Provisioning creates the Coverbase account and an org membership in
invited status. It does not create a login session — the user is linked to your IdP by email on first SSO. SailPoint owns the upstream approval; this API only reflects role/lifecycle into Coverbase.| Method | Path | Idempotent |
|---|---|---|
POST | /v1/users | Yes (Idempotency-Key) |
GET | /v1/users | — |
GET | /v1/users/{user_id} | — |
PATCH | /v1/users/{user_id} | No |
Org roles
Therole field uses these values:
| Value | Role |
|---|---|
org:admin | Admin |
org:member | Member |
org:siloed_member | Siloed member |
org:guest | Guest |
org:auxiliary_member | Auxiliary member |
org:service_account | Service account |
member, basic_member, org:basic_member (→ org:member) and admin (→ org:admin) are also accepted. Any other value is rejected with 422.
Provision a user (create-or-get)
POST /v1/usersinvited), or returns the existing user. Returns 201 Created on create, or 200 OK if a user with that email already exists in the org — so this call is safe to use as create-if-missing and always yields the user’s cbuser_... ID.
Idempotent create-or-get: a same-org email match returns
200 with the existing user (not 409). A 409 user_exists is only returned when the email belongs to a user in a different org (emails are globally unique). The email match is case-insensitive.Request body
The user’s email — validated as a proper email address. Used to link the account to your IdP on first SSO.
Given name.
Family name.
One of the org role values. Defaults to
org:member.Headers
Bearer ak_...Optional. Replaying the same key within 24 hours returns the original
201 body. See Idempotency.Example request
Example response
201 Created (new user), or 200 OK (existing user — the stored object, whose status is its current membership state such as active):
User object
User ID (
cbuser_...).User email.
Given name.
Family name.
Org role value for this org (e.g.
org:admin).Org membership status:
invited, active, or inactive.true once the user is deprovisioned.Unix timestamp (seconds).
Unix timestamp (seconds).
Error responses
| Status | Body | When |
|---|---|---|
| 409 | {"detail": {"code": "user_exists", "message": "A user with email ... already exists."}} | The email belongs to a user in a different org (emails are globally unique). A same-org match now returns 200 with the existing user, not 409. |
| 422 | Standard validation error | email missing or not a valid email address, or role not a recognized value. |
List users and look up by email
GET /v1/usersQuery parameters
Case-insensitive exact-match lookup. Returns the matching user (even if archived, so it can be reactivated) or an empty list. Uses the same matching as the
POST /v1/users duplicate check, so any email that exists is resolvable to its user ID. When supplied, include_archived/limit/offset are ignored.Include deprovisioned (archived) users in the list. Defaults to
false.Page size,
1–200. Defaults to 50.Number of users to skip, for paging. Defaults to
0.Headers
Bearer ak_...Example: resolve a user by email
Example response
200 OK:
Response fields
Total matching users in the org (for an
email lookup this is 0 or 1).Echo of the requested page size.
Echo of the requested offset.
Retrieve a user
GET /v1/users/{user_id}cURL
role and status reflect the current org membership.
| Status | Body | When |
|---|---|---|
| 404 | {"detail": {"code": "user_not_found", "message": "User not found."}} | No such user, or the user has no membership in the API key’s org. |
Update role / deprovision
PATCH /v1/users/{user_id}Request body
New org role (one of the role values). Omit to leave unchanged.
true deprovisions: archives the user and sets org membership to inactive. false reactivates: membership back to active. Omit to leave unchanged.Examples
Change role
Deprovision
Behavior
is_archived: true→ user archived, membershipinactive.is_archived: false→ membershipactive(reactivation).roleset → membership role updated.- Combined (
role+is_archived) is applied together.
Error responses
| Status | Body | When |
|---|---|---|
| 404 | {"detail": {"code": "user_not_found", "message": "User not found."}} | No membership for this user in the API key’s org. |
| 422 | Standard validation error | role not a recognized value. |