Members
GET /users
The members of the organization, with their names and role. A list, one page at a time.
Only members who joined are listed: pending invitations are not. Members' email and phone are never returned.
Keys: every key.
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Members per page, from 1 to 200. 50 by default. |
cursor | string | The next_cursor of the previous page. |
Response
A list: data holds the members, next_cursor points to the next page.
| Field | Type | Description |
|---|---|---|
id | string | The member's id. The same id as created_by.id in expenses. |
first_name | string | |
last_name | string | |
role | string | Their role in the organization: owner, admin, editor or viewer. |
The role doesn't say which budgets a member sees: each budget is shared with people one by one, in the app.
Example
curl "https://app.spendbaker.com/sb_back/api/v1/users?limit=2" \
-H "Authorization: Bearer $SPENDBAKER_KEY"
{
"data": [
{
"id": "0b9e4d27-6a13-4f58-b2c9-81e7d4a0f365",
"first_name": "Camille",
"last_name": "Martin",
"role": "owner"
},
{
"id": "a72c5e19-3b8d-4f60-9e14-d2b7c0a5f831",
"first_name": "Hugo",
"last_name": "Bernard",
"role": "editor"
}
],
"next_cursor": "YTcyYzVlMTktM2I4ZC00ZjYwLTllMTQtZDJiN2MwYTVmODMx"
}
Errors
400 invalid_limit, 400 invalid_cursor, 401, 429 and 500, as in
Errors and limits, and:
| Status | code | When |
|---|---|---|
| 404 | not_found | The organization was deleted. |