cURL
curl -X DELETE "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m" \
-H "Authorization: Bearer $WORKLAYER_API_KEY"const response = await fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
},
});
console.log(response.status); // 204{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 403,
"message": "The web chat Room cannot be changed.",
"error": "Forbidden"
}{
"statusCode": 404,
"message": "Room not found.",
"error": "Not Found"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Rooms
Archive a Room
Archives an API-created Room. Once archived, the Room is omitted from listings and all routes for that Room return 404. Cannot archive the main Room (web).
DELETE
/
v1
/
rooms
/
{roomId}
cURL
curl -X DELETE "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m" \
-H "Authorization: Bearer $WORKLAYER_API_KEY"const response = await fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
},
});
console.log(response.status); // 204{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 403,
"message": "The web chat Room cannot be changed.",
"error": "Forbidden"
}{
"statusCode": 404,
"message": "Room not found.",
"error": "Not Found"
}{
"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.
Path Parameters
Response
The Room is archived.