Work
Check for changes in watched work
Read up to 30 exact owned requests and return semantic changes since their last revision, including results and blocked/approval messages. Omit a revision for the first check. Preserve returned cursors only after processing the changes; a repeated check returns the same unacknowledged changes. Heartbeats alone do not notify. This is a current-state snapshot, not an event history or saved schedule. While activeRequestIds is nonempty, use the assistant's supported background follow-up mechanism and nextCheckAfterSeconds as the earliest next check. Stay quiet on unchanged state. Bring results or required decisions to the user; blocked requests pause automatic checks until the user acts. Never claim monitoring is scheduled unless an actual background task exists. Requires work:read.
Method
POST
Path
/v1/work/watch
Required scope
work:readRequest
curl -X POST "https://api.endurancehq.app/v1/work/watch" \
-H "Authorization: Bearer $EHQ_API_KEY"JSON body schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"requests": {
"minItems": 1,
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"requestId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"revision": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"requestId"
],
"additionalProperties": false
}
}
},
"required": [
"requests"
],
"additionalProperties": false
}Response
Success status: 200
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"changes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"revision": {
"type": "string"
},
"followUp": {
"anyOf": [
{
"type": "object",
"properties": {
"requestId": {
"type": "string"
},
"attempt": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"actionId": {
"type": "string"
}
},
"required": [
"requestId",
"attempt",
"actionId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"continuedByRequestId": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string",
"enum": [
"worker",
"computer_use"
]
},
"requestStatus": {
"type": "string",
"enum": [
"pending",
"approved",
"dispatching",
"dispatched",
"completed",
"rejected",
"failed",
"expired"
]
},
"title": {
"type": "string"
},
"summary": {
"type": [
"string",
"null"
]
},
"project": {
"type": "string"
},
"product": {
"type": "string"
},
"instructions": {
"type": "string"
},
"sourceUrl": {
"type": [
"string",
"null"
]
},
"targetId": {
"type": [
"string",
"null"
]
},
"payloadHash": {
"type": "string"
},
"attempt": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"error": {
"type": [
"string",
"null"
]
},
"action": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"mode": {
"type": "string",
"enum": [
"execute",
"prepare"
]
},
"phase": {
"type": "string"
},
"message": {
"type": "string"
},
"changedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"resultHash": {
"type": [
"string",
"null"
]
},
"acceptedAt": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"url",
"mode",
"phase",
"message",
"changedAt",
"resultHash",
"acceptedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"execution": {
"type": "object",
"properties": {
"provider": {
"type": [
"string",
"null"
]
},
"harness": {
"type": [
"string",
"null"
]
},
"model": {
"type": [
"string",
"null"
]
},
"reasoningEffort": {
"type": [
"string",
"null"
]
},
"threadId": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"startedAt": {
"type": [
"string",
"null"
]
},
"completedAt": {
"type": [
"string",
"null"
]
}
},
"required": [
"provider",
"harness",
"model",
"reasoningEffort",
"threadId",
"url",
"startedAt",
"completedAt"
],
"additionalProperties": false
},
"result": {
"type": "object",
"properties": {
"delegatedDecisions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"credentialId": {
"type": "string"
},
"credentialType": {
"type": "string",
"enum": [
"api_key",
"oauth_token"
]
},
"decision": {
"type": "string",
"enum": [
"approve",
"reject",
"retry",
"accept",
"request_changes"
]
},
"payloadHash": {
"type": "string"
},
"inputHash": {
"type": "string"
},
"attempt": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"recordedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"credentialId",
"credentialType",
"decision",
"payloadHash",
"inputHash",
"attempt",
"recordedAt"
],
"additionalProperties": false
}
},
"reportedOutcome": {
"anyOf": [
{
"type": "string",
"enum": [
"accepted",
"needs_review",
"blocked"
]
},
{
"type": "null"
}
]
},
"criteria": {
"type": "array",
"items": {
"type": "object",
"properties": {
"criterion": {
"type": "string"
},
"passed": {
"type": "boolean"
},
"evidence": {
"type": "string"
}
},
"required": [
"criterion",
"passed",
"evidence"
],
"additionalProperties": false
}
},
"remaining": {
"type": "array",
"items": {
"type": "string"
}
},
"finalMessage": {
"type": [
"string",
"null"
]
}
},
"required": [
"delegatedDecisions",
"reportedOutcome",
"criteria",
"remaining",
"finalMessage"
],
"additionalProperties": false
},
"previousAttempts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attempt": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"requestStatus": {
"type": "string",
"enum": [
"pending",
"approved",
"dispatching",
"dispatched",
"completed",
"rejected",
"failed",
"expired"
]
},
"error": {
"type": [
"string",
"null"
]
},
"result": {
"type": "object",
"properties": {
"delegatedDecisions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"credentialId": {
"type": "string"
},
"credentialType": {
"type": "string",
"enum": [
"api_key",
"oauth_token"
]
},
"decision": {
"type": "string",
"enum": [
"approve",
"reject",
"retry",
"accept",
"request_changes"
]
},
"payloadHash": {
"type": "string"
},
"inputHash": {
"type": "string"
},
"attempt": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"recordedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"credentialId",
"credentialType",
"decision",
"payloadHash",
"inputHash",
"attempt",
"recordedAt"
],
"additionalProperties": false
}
},
"reportedOutcome": {
"anyOf": [
{
"type": "string",
"enum": [
"accepted",
"needs_review",
"blocked"
]
},
{
"type": "null"
}
]
},
"criteria": {
"type": "array",
"items": {
"type": "object",
"properties": {
"criterion": {
"type": "string"
},
"passed": {
"type": "boolean"
},
"evidence": {
"type": "string"
}
},
"required": [
"criterion",
"passed",
"evidence"
],
"additionalProperties": false
}
},
"remaining": {
"type": "array",
"items": {
"type": "string"
}
},
"finalMessage": {
"type": [
"string",
"null"
]
}
},
"required": [
"delegatedDecisions",
"reportedOutcome",
"criteria",
"remaining",
"finalMessage"
],
"additionalProperties": false
}
},
"required": [
"attempt",
"requestStatus",
"error",
"result"
],
"additionalProperties": false
}
},
"review": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"required": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"authority": {
"type": "string",
"enum": [
"ehq_owner",
"delegated_connection"
]
}
},
"required": [
"url",
"required",
"reason",
"authority"
],
"additionalProperties": false
},
"attention": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"approval",
"running",
"blocked",
"result",
"closed"
]
},
"message": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"canFollowUp": {
"type": "boolean"
}
},
"required": [
"kind",
"message",
"url",
"canFollowUp"
],
"additionalProperties": false
}
},
"required": [
"id",
"revision",
"followUp",
"continuedByRequestId",
"kind",
"requestStatus",
"title",
"summary",
"project",
"product",
"instructions",
"sourceUrl",
"targetId",
"payloadHash",
"attempt",
"createdAt",
"expiresAt",
"error",
"action",
"execution",
"result",
"previousAttempts",
"review",
"attention"
],
"additionalProperties": false
}
},
"cursors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"requestId": {
"type": "string"
},
"revision": {
"type": "string"
}
},
"required": [
"requestId",
"revision"
],
"additionalProperties": false
}
},
"activeRequestIds": {
"type": "array",
"items": {
"type": "string"
}
},
"nextCheckAfterSeconds": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"changes",
"cursors",
"activeRequestIds",
"nextCheckAfterSeconds"
],
"additionalProperties": false
}
},
"required": [
"data"
],
"additionalProperties": false
}Other surfaces
CLI: ehq work watch <request_id> [--revision <hash>]
MCP tool: ehq_work_watch