Skip to main content
Programmatic CRUD over users in an app.

Authentication (same for all endpoints)

The key must own the app you’re calling against:
  • App key (scapp_…) — can only manage users in its own app
  • Workspace key (scwor_…) — can manage users in any app within the workspace (or any child workspace, if you’re an MSP parent)
Wrong scope → 403 "API key not authorized for this app".

Create a user

:app_id is the Client App ID (app_…) — the app the user should belong to.

Body

Either email or phone is required. Everything else is optional.

Example

Response — 200 OK

app_id and workspace_id echo the parent — use them to map users back to the right client in your own database.

Get a user

:id is the user UUID returned at creation.

List / search users

Query parameters

  • page, per_page — pagination
  • search — fuzzy match on name / email / phone (requires pg_trgm)
  • status — filter by active or inactive

Response


Update a user

Same body shape as create. PATCH leaves untouched fields alone; PUT overwrites the whole record.

Activate / deactivate

No body. Toggles status between active and inactive. Deactivated users can’t sign in but aren’t deleted.

Delete a user

Hard-deletes the user, their sessions, credentials, and challenges within that app. Other apps in the workspace are untouched.

Bulk: invite / import

Both accept arrays. See the individual endpoint references for body shapes.

Errors