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.
Authentication
AuthorizationBearerSend your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.
Path parameters
threadIdstringRequiredThe id of the thread to send the message in.
Request body Required
The model with the content to send to the agent thread.
application/json
presetKeystring or nullOptionalThe custom-agent preset. Its current settings override the supplied model and reasoning.
contentstring or nullOptionalThe message text. Required when no attachments are supplied.
attachmentsarray of object or nullOptional20 Up to 20 distinct files attached to this message. Each file can contain up to 20 MiB. Upload new files before submitting their identifiers.
Show 2 properties
temporaryFileIdstring or nullOptionalThe identifier returned when uploading a temporary file. Do not also supply aworkFileId.
aworkFileIdstring or nullOptionalThe identifier of an existing awork file the caller can read. Do not also supply temporaryFileId.
modelProviderstring or nullOptionalThe provider for a model override. Supply it together with modelName.
modelNamestring or nullOptionalThe model to use for this message. It must be available in the workspace.
reasoningLevelstring or nullOptionalThe reasoning level for this message. Supported values depend on the selected model.
toolAccessobjectOptionalPer-message agent tool access options.
Show 4 properties
aworkbooleanOptionalWhether awork tools are enabled for this run.
webSearchbooleanOptionalWhether web search is enabled for this run.
googleGenAibooleanOptionalWhether Google GenAI tools are enabled for this run.
openAiImageGenerationbooleanOptionalWhether OpenAI image generation is enabled for this run.
connectorIdsarray of string or nullOptionalThe connector selection for this message.
connectorConnectionsarray of object or nullOptionalConnection choices for custom-agent connectors. These do not change agent settings.
Show 2 properties
connectorIdstringOptionalThe connector identifier.
connectionIdstringOptionalThe connection identifier.
skillIdsarray of string or nullOptionalThe skill selection for this message.
answerToInterruptIdstring or nullOptionalThe interrupt identifier returned with the question being answered.
Responses
200 OK
application/json
threadIdstringOptionalThe thread id.
threadRunIdstring or nullOptionalThe run id when the message started immediately.
acceptedMessageIdstring or nullOptionalThe server-assigned message id. This identity is retained while queued and when execution starts.
queuedMessageIdstring or nullOptionalThe persisted queue entry id when the message must wait.
queueOrderinteger or nullOptionalThe message's current queue position when it must wait.
threadUpdatedOnstring or nullOptionalThe parent timestamp saved with queue acceptance, absent for immediate execution.
isQueuedbooleanOptionalWhether the backend stored the message in the queue.
statusstringOptionalAllowed: "accepted" "queued" "failed"
Whether the message was accepted for execution, queued behind another message, or failed to start.
400 Bad Request
application/json
codestringRequired1 The error code.
descriptionstringRequired1 The description of the error.
linkstringRequired1 The link to the API documentation page.
detailsarray of string or nullOptionalA list of details describing the error.
validationErrorsarray of object or nullOptionalIf a validation error occurred, this contains the validation errors for each property.
Show 2 properties
propertystring or nullOptionalThe name of the property that failed validation.
messagestring or nullOptionalThe reason why this property failed validation.
traceIdstring or nullOptionalThe request trace id for tracking the request.
404 Not Found
application/json
codestringRequired1 The error code.
descriptionstringRequired1 The description of the error.
linkstringRequired1 The link to the API documentation page.
detailsarray of string or nullOptionalA list of details describing the error.
validationErrorsarray of object or nullOptionalIf a validation error occurred, this contains the validation errors for each property.
Show 2 properties
propertystring or nullOptionalThe name of the property that failed validation.
messagestring or nullOptionalThe reason why this property failed validation.
traceIdstring or nullOptionalThe request trace id for tracking the request.
503 Service Unavailable
application/json
codestringRequired1 The error code.
descriptionstringRequired1 The description of the error.
linkstringRequired1 The link to the API documentation page.
detailsarray of string or nullOptionalA list of details describing the error.
validationErrorsarray of object or nullOptionalIf a validation error occurred, this contains the validation errors for each property.
Show 2 properties
propertystring or nullOptionalThe name of the property that failed validation.
messagestring or nullOptionalThe reason why this property failed validation.
traceIdstring or nullOptionalThe request trace id for tracking the request.