Skip to main content
POST
Send a message

Authorizations

Authorization
string
header
required

Identify accepts a workspace API key (sk_…). Loom accepts either a short-lived session token (direct) or a workspace API key (relay).

Headers

Idempotency-Key
string

Makes this POST safe to retry. The first call does the work and its response is stored; a retry with the same key returns that stored response with Idempotency-Replayed: true, without charging again. Same key with a different body is rejected. Keys expire after 24 hours.

Maximum string length: 255
Patchwork-Subject
string

Relay only. Opaque subject id, chosen by you and never resolved by Patchwork. Partitions threads and memory within your workspace. Direct tokens carry sub instead — do not send this header on a session token. Required on every subject-scoped resource: threads, messages, runs, outcomes, confirmations and realtime. Omitting it is subject_required, never a wider result. The value is used exactly as given — never trimmed or normalised — so a stray space creates a second partition and is refused as invalid_subject.

Patchwork-Connection
string

Connection id or name the agent may call. Required in relay when the agent has unpinned customer tools. Direct tokens may carry conn instead.

Path Parameters

thread_id
string<uuid>
required

Body

application/json
content
string
required

User message, or the answer to a pending elicitation.

file_ids
string[]

File handles (file_…) to attach to this message — upload them via the Files API first. The assistant sees the files and can pass a handle to a file-reading tool like extract.

Response

Run accepted.

status
string
required
Allowed value: "success"
data
object
required