Skip to main content

List Users

Fetch the members of your workspace — including deactivated users — so you can map the userId values returned by On-Call History to people. Deactivated users are included because they can still appear in past on-call spans.

Request​

GET https://api.oppex.ai/client/users/public

Send your API key in the X-API-KEY header. All parameters are optional.

curl -G "https://api.oppex.ai/client/users/public" \
-H "X-API-KEY: <your-api-key>"

Query parameters​

ParameterDescription
pageNumberPage to return, starting at 1 (the default).
pageSizeResults per page, between 1 and 100. Default is 50.

Response​

{
"success": true,
"statusCode": 200,
"message": "Users retrieved successfully",
"data": {
"items": [
{ "userId": 1001, "name": "Alice Chen", "active": true },
{ "userId": 1002, "name": "Raj Patel", "active": true },
{ "userId": 1008, "name": "Sam Rivera", "active": false }
],
"totalCount": 3,
"pageNumber": 1,
"pageSize": 50
}
}

Response fields​

FieldDescription
items[].userIdNumeric user id. Matches the userId fields in On-Call History and List On-Call Schedules.
items[].nameDisplay name.
items[].activefalse for a deactivated user. They can still appear in past on-call history — include them in your id-to-name map.
totalCountTotal number of workspace members across all pages.
pageNumberThe page returned.
pageSizeResults per page as requested.

Results are ordered by userId. To fetch all users, repeat with pageNumber from 1 up to ceil(totalCount / pageSize).

Errors​

StatusWhen
400pageNumber or pageSize is out of range.
401The API key is missing, wrong, or disabled. See API Keys.
500Something went wrong in Oppex. Retry. If it keeps happening, contact support with the message.

FAQ

Why are deactivated users included?

A deactivated user's name still appears in on-call history for shifts they worked before being removed from the schedule. Excluding them would leave those spans with an unresolvable userId. Set active: false entries aside in your payroll logic as needed.

Does this return users from all workspaces?

No. The list is scoped to the workspace the API key belongs to. Users who are members of a different workspace are not returned, even if they are in the same organization.

Why is email not included?

Email addresses are intentionally omitted from the public API to limit data exposure. If you need to match users to email addresses, use the Oppex app's Users & Roles page.

In this article

FAQ

Why are deactivated users included?

A deactivated user's name still appears in on-call history for shifts they worked before being removed from the schedule. Excluding them would leave those spans with an unresolvable userId. Set active: false entries aside in your payroll logic as needed.

Does this return users from all workspaces?

No. The list is scoped to the workspace the API key belongs to. Users who are members of a different workspace are not returned, even if they are in the same organization.

Why is email not included?

Email addresses are intentionally omitted from the public API to limit data exposure. If you need to match users to email addresses, use the Oppex app's Users & Roles page.