Skip to main content

Send a message to an Oliver thread (starts a run).

POST/api/v1/oliver-threads/{oliver_thread_id}/messagesoliver:run

Sends your message to the thread's agent and starts a run that answers it. Answers arrive as the run's answer (GET the run, or wait for it). A thread with an unfinished run is 409 naming that run. images attaches pictures to the message and needs Inject Oliver Images. On a progressive thread the message is a new run admitted by the Portal's progressive admission (neither oliver_agent_id nor oliver_model_id applies). The answer is 201 with the run's Location. Needs Start Oliver Runs and Execute Oliver Tools.

Scopeoliver:run
AsynchronousNo
MCP toolcreate_oliver_thread_message
Portal permissionsstart_oliver_runs, execute_oliver_tools

Parameters​

NameInTypeRequiredDescription
oliver_thread_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonOliverMessageCreateInput

Responses​

StatusDescriptionBody
201Success.application/json OliverMessage or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflict, idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

OliverMessage​

FieldTypeRequiredDescription
agent_namestring or nullRequired
contentstringRequired
oliver_agent_idstring or nullRequired
oliver_message_idstringRequired
oliver_run_idstringRequired
oliver_thread_idstringRequired
permission_modestringRequiredask or auto.
statusstringRequiredThe run's status when it was started.

OliverMessageCreateInput​

FieldTypeRequiredDescription
imagesarray of OliverMessageImageInputOptionalImages to attach to the message, as the chat's attach button does: each base64 (a data URL is accepted), with an optional caption. The Oliver image limits apply (count, bytes each and together, pixels): one over them is 413 payload_too_large or 422 on /images.
messagestringRequiredWhat the user says to the agent.
oliver_agent_idstring or nullOptionalThe agent to answer; omit for the thread's agent (the default agent when it has none).
oliver_model_idstring or nullOptionalThe model that answers this message, as the Portal's model picker chooses it for a turn: fast or smart, or an id from list_oliver_models. Omit for the agent's own model.

OliverMessageImageInput​

FieldTypeRequiredDescription
captionstring or nullOptionalWhat the image shows, for the agent; default "User attached image".
datastringRequiredThe image bytes, base64; a data URL is accepted. PNG, JPEG, GIF or WebP.