DocsOpen Workflows

API

Start a run

Start a run on a workflow. Send a request in the body and the run opens its first turn on it at once; send none to create an empty run you trigger later.

POSThttps://api.momor.ai/workflow/workflows/{workflowId}/runs

Authenticate with an API key of your Workflow organization, Authorization: Bearer <key>, or a signed-in session. API keys are created in Settings › API keys. The run belongs to whoever starts it, and only they can read it, trigger it and answer its questions.

Path

workflowIduuidRequired
The workflow’s id, as its upload returned it.

Query

namestring
The trigger the request addresses. Needed only where the workflow accepts more than one.
persistencestringDefault Permanent
How long the run is kept. Ephemeral runs are deleted after 30 minutes without activity, and only where the organization allows them.PermanentEphemeral
referenceIdstring
Your own reference for what the run is about, kept with the run.

Body

The request, checked against the trigger’s schema before anything is created. Leave the body empty to start a run with no turn.

Promptstring
What the run is given to work on: a question, an instruction or a task.
Filesfile[]
Files sent with the prompt.
KindstringRequired
How the file is sent.urlbyteshandle
namestringRequired
The file’s name.
valuestring | objectRequired
For url, the file’s address; for bytes, its content in base64; for handle, a file Momor already stores.
contentTypestringRequired
Its media type, such as application/pdf.
<field>any
Any other field the trigger’s schema declares, sent as it is.

Responses

StatusBody
202
A request was sent: { turn } with the turn it opened. The steps run after the response.
201
No request was sent: the empty run.

With Accept: text/event-stream, the response follows the turn instead: an opened frame with runId and turnId, every event the turn records, then a closed frame with the turn’s state once its ending has reported.

Errors

StatusCodeWhat happened
400
—
The workflow can only be called by other workflows (Standalone: false).
401
—
No API key or session.
404
—
No workflow you can see has this id, or the request names a trigger the workflow does not accept, or names none where it accepts several.
422
—
The request does not match the trigger’s schema. The message says which field.

Errors answer { "message": "…" }. A refused request creates no run.

Updated Oct 22, 2026
Esc