Skip to main content

Create an Oliver thread.

POST/api/v1/oliver-threadsoliver:run

Starts an empty chat thread of yours, with no run and no cost. Without oliver_agent_id it uses the organisation's default agent. contexts scopes the chat to documents, folders and dataviews ("ask Oliver about this document"): each must exist and be readable by you, or the call is refused (422 reference_not_found or reference_forbidden naming the ID you sent), and naming one needs the matching read scope. A progressive agent starts a progressive thread instead, together with its first message and run (message required; the Portal's progressive admission checks that it admits the caller to progressive agents, the tenant's controls and the agent's profile; it needs Start Oliver Runs and Execute Oliver Tools, and images need Inject Oliver Images). The thread starts in ask mode, where any write the agent proposes waits for your approval, unless permission_mode is auto (Oliver itself may not choose auto, 403). Send the first message with POST /oliver-threads/{oliver_thread_id}/messages. Needs Create Oliver Conversations.

Scopeoliver:run
AsynchronousNo
MCP toolcreate_oliver_thread
Portal permissionscreate_oliver_conversations

Parameters​

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

Request body​

Content typeType
application/jsonOliverThreadCreateInput

Responses​

StatusDescriptionBody
201Success.application/json OliverThread or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/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​

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.

OliverThread​

FieldTypeRequiredDescription
agent_namestring or nullRequired
contextsarray of OliverThreadContextRequiredWhat the chat is scoped to: documents, folders and dataviews the agent is told to work with.
created_atstring (date-time) or nullRequired
latest_runOliverThreadRunRef or nullRequiredThe thread's most recent run; null when it has none.
my_ratingOliverThreadFeedback or nullRequiredYour own rating of the thread, as the Portal's rate dialog shows it; null until you rate it. Rate with rate_oliver_thread.
oliver_agent_idstring or nullRequiredThe agent the thread talks to.
oliver_thread_idstringRequired
permission_modestringRequiredask (any write waits for approval) or auto.
titlestring or nullRequiredThe chat's heading, taken from its first message; null until then.
updated_atstring (date-time) or nullRequiredWhen the thread last had a message.

OliverThreadContext​

FieldTypeRequiredDescription
dataview_idstring or nullRequiredThe dataview, for type dataview.
document_idstring or nullRequiredThe document, for type document.
folder_idstring or nullRequiredThe folder, for type folder.
labelstring or nullRequiredWhat the Portal shows for the context: a document's number, a folder's or dataview's name. Read-only: ignored when sent.
typestringRequireddocument, folder or dataview. A context this API does not set (a search, a clustering run, a redaction) reads as unknown.
type_codestring or nullRequiredThe stored type of a context whose type is unknown. Read-only.

OliverThreadContextInput​

FieldTypeRequiredDescription
dataview_idstring or nullOptionalThe dataview, for type dataview.
document_idstring or nullOptionalThe document, for type document.
folder_idstring or nullOptionalThe folder, for type folder.
labelstring or nullOptionalWhat the Portal shows for the context: a document's number, a folder's or dataview's name. Read-only: ignored when sent.
typestringRequireddocument, folder or dataview. A context this API does not set (a search, a clustering run, a redaction) reads as unknown.
type_codestring or nullOptionalThe stored type of a context whose type is unknown. Read-only.

OliverThreadCreateInput​

FieldTypeRequiredDescription
contextsarray of OliverThreadContextInputOptionalWhat to scope the chat to: a document, a folder or a dataview each, as {type, document_id | folder_id | dataview_id}. You must be able to read each, and your token needs documents:read, folders:read or dataviews:read to name one.
imagesarray of OliverMessageImageInputOptionalA progressive agent only: pictures attached to the first message, as for create_oliver_thread_message.
messagestring or nullOptionalA progressive agent only: the first message. A progressive thread is created together with its first message and run (the Portal's progressive admission); a standard thread starts empty and takes its first message with create_oliver_thread_message.
oliver_agent_idstring or nullOptionalThe agent to chat with; omit for the organisation's default agent.
permission_modestring or nullOptionalask (the default: any write the agent proposes waits for your approval) or auto (writes run without asking, each audited on its tool call), as the Portal's mode toggle. Change it later with update_oliver_thread.

OliverThreadFeedback​

FieldTypeRequiredDescription
created_atstring (date-time) or nullRequired
messagestring or nullRequiredWhat went wrong or right; required at 2 stars or fewer.
oliver_thread_idstringRequired
ratingintegerRequired1 to 5 stars. ≥ -2147483648; ≤ 2147483647
releasestring or nullRequiredThe backend release the rating is tied to; null when unknown.

OliverThreadRunRef​

FieldTypeRequiredDescription
oliver_run_idstringRequired
statusstringRequiredThe run's status: planning, executing, running, waiting_for_user, completed, failed or cancelled (open).