cURL
curl "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/history?limit=30" \
-H "Authorization: Bearer $WORKLAYER_API_KEY"const response = await fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/history?limit=30', {
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
},
});
const data = await response.json();
console.log(data);{
"messages": [
{
"id": "cmhx3r0a10007l808m2c4t9xw",
"kind": "event",
"text": "Order 1188 for ticket 4821 is shipped with UPS.",
"createdAt": "2026-11-19T17:41:02.118Z",
"eventId": "b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08"
},
{
"id": "toolu_01HbW7q2Lk9sVd3XnR8cPz4m",
"kind": "response",
"text": "Ticket 4821 is shipped. I sent the tracking number to the customer.",
"createdAt": "2026-11-19T17:42:08.311Z"
}
],
"nextCursor": "cmhx3q9f80005l8086b1n0d4k"
}{
"statusCode": 400,
"message": "Invalid cursor for this request.",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Room not found.",
"error": "Not Found"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Rooms
Get Room History
Returns a Room’s read-only conversation log—including user messages, Events, and factory replies. The first page returns the newest entries (ordered oldest-first within the page), and nextCursor paginates backward to older entries. To send new input, submit an Event. See Room History.
GET
/
v1
/
rooms
/
{roomId}
/
history
cURL
curl "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/history?limit=30" \
-H "Authorization: Bearer $WORKLAYER_API_KEY"const response = await fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/history?limit=30', {
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
},
});
const data = await response.json();
console.log(data);{
"messages": [
{
"id": "cmhx3r0a10007l808m2c4t9xw",
"kind": "event",
"text": "Order 1188 for ticket 4821 is shipped with UPS.",
"createdAt": "2026-11-19T17:41:02.118Z",
"eventId": "b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08"
},
{
"id": "toolu_01HbW7q2Lk9sVd3XnR8cPz4m",
"kind": "response",
"text": "Ticket 4821 is shipped. I sent the tracking number to the customer.",
"createdAt": "2026-11-19T17:42:08.311Z"
}
],
"nextCursor": "cmhx3q9f80005l8086b1n0d4k"
}{
"statusCode": 400,
"message": "Invalid cursor for this request.",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"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.