Skip to main content

Staffs

Staffs are the team members of your account. Use their ids to book appointments with a given person, assign chats, or block time on their calendar (time off, meetings) so no one can book it. Team members are read only through the API; blocking time needs the Bookings add-on.

API regionapi.whautomate.com

List staff​

GET /v1/staffs

Lists team members.

Headers
x-api-keystringrequired
Your Whautomate API key.
Query parameters
locationIdstring
Location (workspace) id. Get ids from GET /v1/locations.
limitinteger
Results per page (default 10, max 100).
pageinteger
Page number, from 1 (default 1).
searchTextstring
Text to search for.
Response 200
idstring
firstNamestringrequired
lastNamestring
emailstring
genderstring (enum)
One of: Male, Female, Unknown, Other.
countryCodestring
phonestringrequired
activeboolean
locationsstring[]required
Request
curl -X GET "https://api.whautomate.com/v1/staffs?locationId=Le6dWjQF9K&limit=3" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"id": "XCRbjjnGrB",
"firstName": "Maya",
"lastName": "Lim",
"email": "maya@serenewellness.example",
"countryCode": "+65",
"phone": "81234567",
"active": true,
"locations": [
"Le6dWjQF9K",
"xP9JwUC8Ss"
]
},
{
"id": "ZxkrjyVgDE",
"firstName": "Aisha",
"lastName": "Rahman",
"email": "aisha@serenewellness.example",
"countryCode": "+65",
"phone": "84001371",
"active": true,
"locations": [
"Le6dWjQF9K"
]
}
]

Get a staff member​

GET /v1/staffs/{staffId}

Gets one team member by id.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
staffIdstringrequired
Staff member id. Get ids from GET /v1/staffs.
Response 200
idstring
firstNamestringrequired
lastNamestring
emailstring
genderstring (enum)
One of: Male, Female, Unknown, Other.
countryCodestring
phonestringrequired
activeboolean
locationsstring[]required
Request
curl -X GET "https://api.whautomate.com/v1/staffs/XrHPepEL8A" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"id": "XrHPepEL8A",
"firstName": "Wei Jie",
"lastName": "Tan",
"email": "weijie@serenewellness.example",
"countryCode": "+65",
"phone": "84002742",
"active": true,
"locations": [
"Le6dWjQF9K"
]
}

List blocked time​

GET /v1/staffs/{staffId}/availabilityBlocks

Lists a team member's blocked time in a date range.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
staffIdstringrequired
Staff member id. Get ids from GET /v1/staffs.
Query parameters
startDatestring
Start of the date range (YYYY-MM-DD, account timezone).
endDatestring
End of the date range (YYYY-MM-DD, account timezone).
Response 200
idstring
staffobjectrequired
timezonestring
datestringrequired
slotsobject[]required

Times as 'hh:mm AM/PM' in the timezone. An endTime at or before the startTime ends the next day ('10:00 PM' to '02:00 AM' is overnight, '12:00 AM' to '12:00 AM' is 24 hours).

Request
curl -X GET "https://api.whautomate.com/v1/staffs/XrHPepEL8A/availabilityBlocks?startDate=2026-11-13&endDate=2026-11-20" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"id": "tw5rzdZNzA",
"staff": {
"id": "XrHPepEL8A",
"firstName": "Wei Jie",
"lastName": "Tan"
},
"timezone": "Asia/Singapore",
"date": "2026-11-13",
"slots": [
{
"startTime": "01:00 PM",
"startTimeUTC": "05:00 AM",
"endTime": "02:30 PM",
"endTimeUTC": "06:30 AM"
}
]
}
]

Block time​

POST /v1/staffs/{staffId}/availabilityBlocks

Blocks time on a team member's calendar so it cannot be booked.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
staffIdstringrequired
Staff member id. Get ids from GET /v1/staffs.
Body
idstring
staffobjectrequired
timezonestring
datestringrequired
slotsobject[]required

Times as 'hh:mm AM/PM' in the timezone. An endTime at or before the startTime ends the next day ('10:00 PM' to '02:00 AM' is overnight, '12:00 AM' to '12:00 AM' is 24 hours).

Response 200
idstring
staffobjectrequired
timezonestring
datestringrequired
slotsobject[]required

Times as 'hh:mm AM/PM' in the timezone. An endTime at or before the startTime ends the next day ('10:00 PM' to '02:00 AM' is overnight, '12:00 AM' to '12:00 AM' is 24 hours).

Request
curl -X POST "https://api.whautomate.com/v1/staffs/XrHPepEL8A/availabilityBlocks" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-11-13",
"timezone": "Asia/Singapore",
"slots": [
{
"startTime": "01:00 PM",
"endTime": "02:30 PM"
}
]
}'
Response 200
{
"id": "tw5rzdZNzA",
"staff": {
"id": "XrHPepEL8A",
"firstName": "Wei Jie",
"lastName": "Tan"
},
"timezone": "Asia/Singapore",
"date": "2026-11-13",
"slots": [
{
"startTime": "01:00 PM",
"startTimeUTC": "05:00 AM",
"endTime": "02:30 PM",
"endTimeUTC": "06:30 AM"
}
]
}

Get blocked time​

GET /v1/staffs/{staffId}/availabilityBlocks/{availabilityBlockId}

Gets one block of time by id.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
staffIdstringrequired
Staff member id. Get ids from GET /v1/staffs.
availabilityBlockIdstringrequired
Response 200
idstring
staffobjectrequired
timezonestring
datestringrequired
slotsobject[]required

Times as 'hh:mm AM/PM' in the timezone. An endTime at or before the startTime ends the next day ('10:00 PM' to '02:00 AM' is overnight, '12:00 AM' to '12:00 AM' is 24 hours).

Request
curl -X GET "https://api.whautomate.com/v1/staffs/XrHPepEL8A/availabilityBlocks/tw5rzdZNzA" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"id": "tw5rzdZNzA",
"staff": {
"id": "XrHPepEL8A",
"firstName": "Wei Jie",
"lastName": "Tan"
},
"timezone": "Asia/Singapore",
"date": "2026-11-13",
"slots": [
{
"startTime": "01:00 PM",
"startTimeUTC": "05:00 AM",
"endTime": "02:30 PM",
"endTimeUTC": "06:30 AM"
}
]
}

Delete blocked time​

DEL /v1/staffs/{staffId}/availabilityBlocks/{availabilityBlockId}

Frees a block of time again.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
staffIdstringrequired
Staff member id. Get ids from GET /v1/staffs.
availabilityBlockIdstringrequired
Response 200
successboolean
Request
curl -X DELETE "https://api.whautomate.com/v1/staffs/XrHPepEL8A/availabilityBlocks/tw5rzdZNzA" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"success": true
}