cURL
curl "https://api.myworklayer.com/v1/agents/support-V7EHih/history?limit=30" \
-H "Authorization: Bearer $WORKLAYER_API_KEY"const response = await fetch('https://api.myworklayer.com/v1/agents/support-V7EHih/history?limit=30', {
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
},
});
const data = await response.json();
console.log(data);{
"entries": [
{
"id": "toolu_01HbW7q2Lk9sVd3XnR8cPz4m",
"kind": "response",
"text": "I refunded the duplicate charge for order 1188.",
"createdAt": "2026-11-19T17:52:08.311Z",
"roomId": "cmhx3q7v20004l808sd5k2r1m",
"roomName": "Support ticket 4821",
"roomSource": "api",
"roomKind": "api"
},
{
"id": "cmhx3r0a10007l808m2c4t9xw",
"kind": "event",
"text": "Deploy failed on main.",
"createdAt": "2026-11-19T17:41:02.118Z",
"eventId": "b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08",
"roomId": "cmhw0b1k90001l808a1x7v3qf",
"roomName": "#ops",
"roomSource": "slack",
"roomKind": "channel"
}
],
"nextCursor": "cmhx3q9f80005l8086b1n0d4k"
}{
"statusCode": 400,
"message": "Invalid cursor for this request.",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Agent not found.",
"error": "Not Found"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Rooms
Get Factory History
Returns the history entries of all Rooms of the factory as one log, newest first: user messages, Events, factory replies and Worker starts, each with its Room. nextCursor paginates to older entries. The API key must belong to the factory. See Factory History.
GET
/
v1
/
agents
/
{agentId}
/
history
cURL
curl "https://api.myworklayer.com/v1/agents/support-V7EHih/history?limit=30" \
-H "Authorization: Bearer $WORKLAYER_API_KEY"const response = await fetch('https://api.myworklayer.com/v1/agents/support-V7EHih/history?limit=30', {
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
},
});
const data = await response.json();
console.log(data);{
"entries": [
{
"id": "toolu_01HbW7q2Lk9sVd3XnR8cPz4m",
"kind": "response",
"text": "I refunded the duplicate charge for order 1188.",
"createdAt": "2026-11-19T17:52:08.311Z",
"roomId": "cmhx3q7v20004l808sd5k2r1m",
"roomName": "Support ticket 4821",
"roomSource": "api",
"roomKind": "api"
},
{
"id": "cmhx3r0a10007l808m2c4t9xw",
"kind": "event",
"text": "Deploy failed on main.",
"createdAt": "2026-11-19T17:41:02.118Z",
"eventId": "b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08",
"roomId": "cmhw0b1k90001l808a1x7v3qf",
"roomName": "#ops",
"roomSource": "slack",
"roomKind": "channel"
}
],
"nextCursor": "cmhx3q9f80005l8086b1n0d4k"
}{
"statusCode": 400,
"message": "Invalid cursor for this request.",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Agent 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.