Loading API reference…
/organizations/{organizationId}/chats/{chatId}/messagesOrganization identifier.
uuidChat identifier.
uuidOpaque cursor returned by the previous page.
Value in
Value in
Value in
Value in
application/json
application/json
curl -X GET "https://example.com/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/chats/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages"{ "success": true, "statusCode": 200, "message": "Messages listed.", "data": [ { "id": "380c8d1f-7a6a-4a8d-8dd9-3e9ecda3f4f1", "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "chatId": "0ce65ee0-dcd9-46c2-90a4-243f5d54dc66", "replyToMessageId": null, "role": "user", "status": "complete", "revision": 1, "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" } ], "pagination": { "cursor": null, "limit": 50, "nextCursor": null, "previousCursor": null, "hasNextPage": false, "hasPreviousPage": false }, "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" }}/organizations/{organizationId}/chats/{chatId}/messagesPersists the user message and its pending assistant response atomically.
Organization identifier.
uuidChat identifier.
uuidapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
curl -X POST "https://example.com/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/chats/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages" \ -H "Content-Type: application/json" \ -d '{ "author": { "kind": "human", "displayName": "Operator" }, "parts": [ { "kind": "text", "text": "Create the onboarding plan." } ] }'{ "success": true, "statusCode": 202, "message": "Message accepted.", "data": { "userMessage": { "id": "380c8d1f-7a6a-4a8d-8dd9-3e9ecda3f4f1", "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "chatId": "0ce65ee0-dcd9-46c2-90a4-243f5d54dc66", "replyToMessageId": null, "role": "user", "status": "complete", "revision": 1, "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" }, "assistantMessage": { "id": "d4ad2b33-d18c-45c2-965d-22a883af9d89", "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "chatId": "0ce65ee0-dcd9-46c2-90a4-243f5d54dc66", "replyToMessageId": "380c8d1f-7a6a-4a8d-8dd9-3e9ecda3f4f1", "role": "assistant", "status": "pending", "revision": 1, "author": null, "parts": [], "error": null, "completedAt": null, "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": 409, "message": "This chat already has an active assistant response.", "error": { "code": "chat_turn_active" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}/organizations/{organizationId}/messages/{id}Organization identifier.
uuidResource identifier.
uuidapplication/json
application/json
application/json
curl -X GET "https://example.com/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "success": true, "statusCode": 200, "message": "Message found.", "data": { "id": "380c8d1f-7a6a-4a8d-8dd9-3e9ecda3f4f1", "organizationId": "7d4a6f1d-ff64-4a4f-9e8d-937bfaa0d2f1", "chatId": "0ce65ee0-dcd9-46c2-90a4-243f5d54dc66", "replyToMessageId": null, "role": "user", "status": "complete", "revision": 1, "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": 404, "message": "Message not found.", "error": { "code": "message_not_found" }, "meta": { "timestamp": "2026-01-01T00:00:00.000Z" }}