Users
Users
List Users
- Authentication: Required
- Required Role: Collaborator or Administrator
GET /api/v1/users
Returns a page of users, ordered by role (Administrators first) and then by name. Deleted users are not returned.
Parameters
| Name | Type | Description |
|---|---|---|
query | string | Only return users whose name or email contains this text (case-insensitive). |
roles | string | The roles to filter by. Separate multiple roles by ,. Possible values are visitor, collaborator and administrator. |
page | integer | The page to return, starting at 1. Default: 1 |
limit | integer | The number of users per page. Default: 10 |
Example
GET <baseURL>/api/v1/users?roles=administrator,collaborator&page=1&limit=20
Response
200 OK
---
{
"users": [
{
"id": 3,
"name": "Arya Stark",
"role": "administrator",
"avatarURL": "https://feedback.yourcompany.com/static/avatars/gravatar/3/Arya%20Stark",
"status": "active",
"isTrusted": false,
"email": "arya.stark@got.com"
},
{
"id": 24,
"name": "The Queen",
"role": "collaborator",
"avatarURL": "https://feedback.yourcompany.com/static/avatars/letter/24/The%20Queen",
"status": "blocked",
"isTrusted": false,
"email": "queen@got.com"
}
],
"totalCount": 2,
"totalPages": 1,
"page": 1,
"limit": 20
}
status is either active or blocked. isTrusted is true for users whose content skips moderation.
Create a User
- Authentication: Required
- Required Role: Administrator
POST /api/v1/users
The Create User API will only create a new user if it cannot find an existing user with given reference or email (in that order). If the user already exists on Fider, the ID of the existing user is returned instead of creating a new user. New users are created with the visitor role.
When a reference is sent and the user doesn't have one yet, it is linked to the user, so the user can later be found by that reference.
The ID returned by this API can be used to impersonate that user. Read more about impersonation.
Parameters
| Name | Type | Description |
|---|---|---|
name | string | Required. The name of the user. Maximum 100 characters. |
email | string | The email of the user. Either email or reference is required. |
reference | string | A unique ID for the user in another system. Maximum 100 characters. Either email or reference is required. |
Example
POST <baseURL>/api/v1/users
---
{
"name": "Jon Snow",
"email": "jon.snow@got.com",
"reference": "CRM-817453"
}
Response
200 OK
---
{
"id": 6332
}