Staff
List and read the team members in your account, so your systems can look up who works in which workspace.
Read only
Inviting, editing, deactivating and removing team members is done in the app. POST /v1/staffs, PUT /v1/staffs/{id} and DELETE /v1/staffs/{id} return 405 {"error":"Method not supported"}.
The team member object
Attributes
idstringTeam member id
firstName, lastNamestringFirst and last name
emailstringLogin email
countryCodestringDialling code of the phone number, for example
+1phonestringPhone number without the dialling code
rolestringThe team member's role, as shown in the app, for example
Agentactivebooleanfalse if the team member has been deactivatedworkspacesstring[]Ids of the workspaces this team member can access. Match them with the Workspace API.
Fields with no value are left out of the response.
The team member object
{
"id": "Zp3qL8vYtA",
"firstName": "Maria",
"lastName": "Lopez",
"email": "[email protected]",
"countryCode": "+1",
"phone": "2025550188",
"role": "Agent",
"active": true,
"workspaces": ["kR4tW9pLxQ", "Hb7mN2sVcE"]
}
List team members
GET
/v1/staffsBoth active and deactivated team members are included; check active to tell them apart.
Query parameters
workspaceIdstringOnly team members who have access to this workspace. An unknown id returns an empty array, not an error.
searchTextstringReturns team members whose full name (first and last name) contains this text. Not case sensitive.
pageintegerdefault 1Page number, starting at 1
limitintegerdefault 10Results per page. Max
100; larger values are capped at 100.200 OK: a JSON array of team members.
Errors
| Status | Body | When |
|---|---|---|
401 | {"message":"Unauthorized"} | The x-api-key header is missing, invalid or the key was deleted |
500 | {"error":"Could not retrieve Staffs"} | Something went wrong on our side. Retry, and contact support if it continues. |
Request
curl "https://api.whauto.chat/v1/staffs?workspaceId=kR4tW9pLxQ&searchText=maria" \
-H "x-api-key: $WHAUTOCHAT_API_KEY"
Response 200
[
{
"id": "Zp3qL8vYtA",
"firstName": "Maria",
"lastName": "Lopez",
"email": "[email protected]",
"countryCode": "+1",
"phone": "2025550188",
"role": "Agent",
"active": true,
"workspaces": ["kR4tW9pLxQ", "Hb7mN2sVcE"]
}
]
Get a team member
GET
/v1/staffs/{id}Path parameters
idstringrequiredTeam member id
200 OK: the team member object.
Errors
| Status | Body | When |
|---|---|---|
401 | {"message":"Unauthorized"} | The x-api-key header is missing, invalid or the key was deleted |
404 | {"error":"Staff not found"} | No team member with that id in your account |
500 | {"error":"Could not retrieve Staff"} | Something went wrong on our side. Retry, and contact support if it continues. |
Request
curl "https://api.whauto.chat/v1/staffs/Zp3qL8vYtA" \
-H "x-api-key: $WHAUTOCHAT_API_KEY"
Response 200
{
"id": "Zp3qL8vYtA",
"firstName": "Maria",
"lastName": "Lopez",
"email": "[email protected]",
"countryCode": "+1",
"phone": "2025550188",
"role": "Agent",
"active": true,
"workspaces": ["kR4tW9pLxQ", "Hb7mN2sVcE"]
}