cURL
curl -X POST "https://api.myworklayer.com/v1/rooms" \
-H "Authorization: Bearer $WORKLAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support ticket 4821",
"externalKey": "zendesk-ticket-4821"
}'const response = await fetch('https://api.myworklayer.com/v1/rooms', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Support ticket 4821",
"externalKey": "zendesk-ticket-4821"
}),
});
const data = await response.json();
console.log(data);{
"id": "cmhx3q7v20004l808sd5k2r1m",
"source": "api",
"kind": "api",
"name": "Support ticket 4821",
"externalKey": "zendesk-ticket-4821",
"lastActivityAt": "2026-11-19T17:42:08.311Z",
"createdAt": "2026-11-19T17:40:55.902Z"
}{
"statusCode": 400,
"message": "Invalid Room body.",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 409,
"error": "Conflict",
"message": "A Room with this externalKey exists.",
"roomId": "cmhx3q7v20004l808sd5k2r1m"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Rooms
Create a Room
Creates a new isolated Room in your factory—for example, one Room per support ticket or customer. Pass an externalKey to map the Room cleanly to an ID in your own system.
POST
/
v1
/
rooms
cURL
curl -X POST "https://api.myworklayer.com/v1/rooms" \
-H "Authorization: Bearer $WORKLAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support ticket 4821",
"externalKey": "zendesk-ticket-4821"
}'const response = await fetch('https://api.myworklayer.com/v1/rooms', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Support ticket 4821",
"externalKey": "zendesk-ticket-4821"
}),
});
const data = await response.json();
console.log(data);{
"id": "cmhx3q7v20004l808sd5k2r1m",
"source": "api",
"kind": "api",
"name": "Support ticket 4821",
"externalKey": "zendesk-ticket-4821",
"lastActivityAt": "2026-11-19T17:42:08.311Z",
"createdAt": "2026-11-19T17:40:55.902Z"
}{
"statusCode": 400,
"message": "Invalid Room body.",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 409,
"error": "Conflict",
"message": "A Room with this externalKey exists.",
"roomId": "cmhx3q7v20004l808sd5k2r1m"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Authorizations
Your factory's Worklayer API key (wrk-...). See Get an API key and Authentication. Requests sent from the playground execute live against your factory.
Body
application/json
Response
The new Room.
A conversation between your app and the factory. Each factory has a main Room, and you can create more.