Skip to main content

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
idstring
Team member id
firstName, lastNamestring
First and last name
emailstring
Login email
countryCodestring
Dialling code of the phone number, for example +1
phonestring
Phone number without the dialling code
rolestring
The team member's role, as shown in the app, for example Agent
activeboolean
false if the team member has been deactivated
workspacesstring[]
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/staffs

Both active and deactivated team members are included; check active to tell them apart.

Query parameters
workspaceIdstring
Only team members who have access to this workspace. An unknown id returns an empty array, not an error.
searchTextstring
Returns team members whose full name (first and last name) contains this text. Not case sensitive.
pageintegerdefault 1
Page number, starting at 1
limitintegerdefault 10
Results per page. Max 100; larger values are capped at 100.

200 OK: a JSON array of team members.

Errors
StatusBodyWhen
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
idstringrequired
Team member id

200 OK: the team member object.

Errors
StatusBodyWhen
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"]
}