Start a workflow run
Start a workflow with your inputs and get a run id back.
POST {base_url}/workflow-runsRequires runs:write.
Request
POST {base_url}/workflow-runs
Authorization: Bearer mor_live_…
Content-Type: application/json
{
"org_id": "0192f3c1-7a44-7d10-9b22-1e5c8f0a3b61",
"project_id": "0192f3c2-4b18-7e93-8c07-9d2a6f4e1c58",
"workflow_id": "0192f3c3-9d21-7c44-b8e1-5a7f2c9d4e10",
"workflow_version_id": "0192f3c4-1a02-7bb3-9f40-2c6e8d1a5b77",
"idempotency_key": "story-48213-v2",
"name": "Story 48213",
"llm_model": "opus-5.5",
"user_email": "editor@example.com",
"inputs": {
"story_document": "https://cdn.example.com/stories/48213.pdf",
"character_sheets": [
"https://cdn.example.com/chars/48213-a.png",
"https://cdn.example.com/chars/48213-b.png"
],
"episode_count": 8,
"tone": "thriller"
}
}| Body field | Required | Meaning |
|---|---|---|
org_id | yes | your organization; must match the key's |
project_id | yes | the canvas the run and its assets land in: the id in its Morphic URL, …/editor/<project_id>/canvas |
workflow_id | yes | the workflow to run |
inputs | yes | an object keyed by each input's key |
idempotency_key | recommended | makes a retry safe. See Conventions |
workflow_version_id | no | pins the version you read the inputs from |
webhook_id | no | sends this run's events to one registered endpoint. See Webhooks |
name | no | the title of the run's chat in Morphic, shown as API: <name>. One line, up to 250 characters. Leave it out to use the workflow's name |
llm_model | no | the model the run's Copilot works on: auto, or a model id such as opus-5.5 or sonnet-5.5. Leave it out, or send null, for auto. A retired id runs on its replacement. An unknown id is a 400 that lists the valid ones; a model your plan does not include, or that an admin turned off for your organization, is a 403 |
user_email | no | the email of the person in your system the run is for. If it belongs to a member of your organization, the run opens as that member, so its chat and its spend are theirs. Otherwise the run stays the organization's API user's, the email is added to the chat's title, and Credit usage lists its spend under that email |
How to send each input
accepts | Send | With allow_multiple |
|---|---|---|
value | the string, number or boolean itself | an array of them |
url | one public HTTPS link, as a string | an array of links |
option | one options[].id, exactly as given | an array of ids |
Response
202 Accepted
{
"run": {
"id": "0192f3d0-6c31-7a52-b4e8-3f9d1a7c5e20",
"status": "queued",
"workflow_id": "0192f3c3-9d21-7c44-b8e1-5a7f2c9d4e10",
"workflow_version_id": "0192f3c4-1a02-7bb3-9f40-2c6e8d1a5b77",
"project_id": "0192f3c2-4b18-7e93-8c07-9d2a6f4e1c58",
"chat_id": "0192f3c6-2e75-7b14-9a63-7c4e2d8f1b09",
"user_email": "editor@example.com",
"ingested": [],
"poll_after_seconds": 60,
"expires_at": "2026-09-23T04:10:00Z"
}
}| Response field | Meaning |
|---|---|
id | the run id. Poll it, and keep it against your own record |
status | queued on acceptance |
chat_id | the chat in Morphic the run happens in. Open it to watch the run or answer a question it asks |
ingested | one entry per file fetched, in the order sent. Empty while a run's links are still being fetched |
user_email | the user_email you sent, or null |
poll_after_seconds | how long to wait before the first poll |
expires_at | when an unfinished run is abandoned as expired |
A run with file links answers 202 at once and fetches the links in the background before the workflow starts. A link that cannot be fetched, or breaks a link rule, fails the run, and its error says which link and why. Checks that need no download, such as a malformed link or a missing input, are still a 400 before anything is fetched.
If you have any trouble or have any questions, feel free to reach out. We're happy to help. Write to us at support@morphic.com.