agentThreads

Submits a message to an agent conversation.

Changed on

Submits a new message to an existing agent conversation for processing. Provide text, attachments, or both. The message starts processing or enters the thread's queue. The response confirms acceptance; it does not contain the agent's reply. Read GET /agents/threads/{threadId}/messages to retrieve replies. Each request submits a new message. Retrying after a lost response can submit the message again. Processing is subject to the workspace's AI availability and usage limits. <Check title="Required Permissions" icon="key">The user must have permission to contribute to the thread.</Check>

post/agents/threads/{threadId}/messages

Request

  • Base URL
    https://api.awork.com/api/v1
  • URL
    https://api.awork.com/api/v1/agents/threads/{threadId}/messages
  • Auth
    HTTP bearer

Path parameters

threadIdstring uuid required

The id of the thread to send the message in.

Request body

presetKeystring nullable

The custom-agent preset. Its current settings override the supplied model and reasoning.

contentstring nullable

The message text. Required when no attachments are supplied.

modelProviderstring nullable

The provider for a model override. Supply it together with modelName.

modelNamestring nullable

The model to use for this message. It must be available in the workspace.

reasoningLevelstring nullable

The reasoning level for this message. Supported values depend on the selected model.

connectorIdsstring[] nullable

The connector selection for this message.

skillIdsstring[] nullable

The skill selection for this message.

answerToInterruptIdstring nullable

The interrupt identifier returned with the question being answered.

Response

OK

threadIdstring uuid

The thread id.

threadRunIdstring uuid nullable

The run id when the message started immediately.

acceptedMessageIdstring uuid nullable

The server-assigned message id. This identity is retained while queued and when execution starts.

queuedMessageIdstring uuid nullable

The persisted queue entry id when the message must wait.

queueOrderinteger nullable

The message's current queue position when it must wait.

threadUpdatedOnstring date-time nullable

The parent timestamp saved with queue acceptance, absent for immediate execution.

isQueuedboolean

Whether the backend stored the message in the queue.

status'accepted' | 'queued' | 'failed'

Whether the message was accepted for execution, queued behind another message, or failed to start.

Changes