Loading API reference…
/internal/chat/messages/{assistantMessageId}/claimagentServiceToken Token used by trusted agent runtimes.
In: header
Assistant message identifier.
uuidapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/internal/chat/messages/497f6eca-6276-4993-bfeb-53cbbbba6f08/claim" \ -H "Content-Type: application/json" \ -d '{ "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1" }'{ "success": true, "statusCode": 200, "message": "Assistant message claimed.", "data": { "kind": "chat", "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "agentProfileId": "8abf91f2-5785-44c7-bfb2-508fa85a8f8d", "chatId": "0ce65ee0-dcd9-46c2-90a4-243f5d54dc66", "userMessageId": "380c8d1f-7a6a-4a8d-8dd9-3e9ecda3f4f1", "assistantMessageId": "d4ad2b33-d18c-45c2-965d-22a883af9d89", "expectedRevision": 2, "prompt": "Review this week's support trends.", "contextManifestKey": "organizations/7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1/chats/0ce65ee0-dcd9-46c2-90a4-243f5d54dc66/context/manifest.json", "workspaceKey": "organizations/7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1/chats/0ce65ee0-dcd9-46c2-90a4-243f5d54dc66/workspace", "executionToken": "<execution-capability>" }}{ "success": false, "statusCode": 400, "message": "Validation failed.", "error": { "code": "validation_failed", "issues": [ { "path": "organizationId", "message": "Must be a valid UUID.", "code": "invalid_format" } ] }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 401, "message": "Invalid agent service token.", "error": { "code": "agent_unauthorized" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 404, "message": "Assistant message not found.", "error": { "code": "message_not_found" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 409, "message": "Assistant message revision is stale.", "error": { "code": "message_revision_conflict" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}/internal/chat/messages/{assistantMessageId}/eventsagentServiceToken Token used by trusted agent runtimes.
In: header
Assistant message identifier.
uuidapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/internal/chat/messages/497f6eca-6276-4993-bfeb-53cbbbba6f08/events" \ -H "Content-Type: application/json" \ -d '{ "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "expectedRevision": 2, "harnessSessionId": "codex-session-42", "event": { "type": "text.delta", "partId": "answer", "delta": "Hello" } }'{ "success": true, "statusCode": 200, "message": "Chat event applied.", "data": { "id": "380c8d1f-7a6a-4a8d-8dd9-3e9ecda3f4f1", "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "chatId": "0ce65ee0-dcd9-46c2-90a4-243f5d54dc66", "replyToMessageId": null, "role": "assistant", "status": "processing", "revision": 2, "author": { "kind": "human", "displayName": "Operator" }, "parts": [ { "id": "part-1", "kind": "text", "text": "Create the onboarding plan." } ], "error": null, "completedAt": "2026-01-01T00:00:00.000Z", "createdAt": "2026-01-01T00:00:00.000Z", "updatedAt": "2026-01-01T00:00:00.000Z" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 400, "message": "Validation failed.", "error": { "code": "validation_failed", "issues": [ { "path": "organizationId", "message": "Must be a valid UUID.", "code": "invalid_format" } ] }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 401, "message": "Invalid agent service token.", "error": { "code": "agent_unauthorized" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 404, "message": "Assistant message not found.", "error": { "code": "message_not_found" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 409, "message": "Assistant message revision is stale.", "error": { "code": "message_revision_conflict" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}/internal/chat/messages/{assistantMessageId}/finalizeagentServiceToken Token used by trusted agent runtimes.
In: header
Assistant message identifier.
uuidapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/internal/chat/messages/497f6eca-6276-4993-bfeb-53cbbbba6f08/finalize" \ -H "Content-Type: application/json" \ -d '{ "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "expectedRevision": 5, "status": "complete", "harnessSessionId": "codex-session-42" }'{ "success": true, "statusCode": 200, "message": "Assistant message finalized.", "data": { "id": "380c8d1f-7a6a-4a8d-8dd9-3e9ecda3f4f1", "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "chatId": "0ce65ee0-dcd9-46c2-90a4-243f5d54dc66", "replyToMessageId": null, "role": "assistant", "status": "processing", "revision": 2, "author": { "kind": "human", "displayName": "Operator" }, "parts": [ { "id": "part-1", "kind": "text", "text": "Create the onboarding plan." } ], "error": null, "completedAt": "2026-01-01T00:00:00.000Z", "createdAt": "2026-01-01T00:00:00.000Z", "updatedAt": "2026-01-01T00:00:00.000Z" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 400, "message": "Validation failed.", "error": { "code": "validation_failed", "issues": [ { "path": "organizationId", "message": "Must be a valid UUID.", "code": "invalid_format" } ] }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 401, "message": "Invalid agent service token.", "error": { "code": "agent_unauthorized" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 404, "message": "Assistant message not found.", "error": { "code": "message_not_found" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 409, "message": "Assistant message revision is stale.", "error": { "code": "message_revision_conflict" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}/internal/chat/reconcileagentServiceToken Token used by trusted agent runtimes.
In: header
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/internal/chat/reconcile"{ "success": true, "statusCode": 200, "message": "Chat messages reconciled.", "data": { "organizationsProcessed": 2, "pendingPublished": 1, "interruptedFinalized": 0 }}{ "success": false, "statusCode": 400, "message": "Validation failed.", "error": { "code": "validation_failed", "issues": [ { "path": "organizationId", "message": "Must be a valid UUID.", "code": "invalid_format" } ] }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 401, "message": "Invalid agent service token.", "error": { "code": "agent_unauthorized" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 404, "message": "Assistant message not found.", "error": { "code": "message_not_found" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}{ "success": false, "statusCode": 409, "message": "Assistant message revision is stale.", "error": { "code": "message_revision_conflict" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}uuiduuiduuidValue in