For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETList flows
      • POSTCreate flow
      • GETGet flow details
      • PUTUpdate flow
      • DELDelete flow
      • GETExport flow for runtime (limited preview)
      • POSTPublish flow
      • POSTRun flow on records of a type
      • GETList flow step results
Dashboard
LogoLogo
Runtype APIFlows

Update flow

PUT
/v1/flows/:id
PUT
/v1/flows/:id
$curl -X PUT https://api.runtype.com/v1/flows/id \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "flowSteps": [
> {
> "name": "Analyze Input",
> "type": "prompt",
> "config": {
> "model": "claude-sonnet-4-5",
> "outputVariable": "analysis",
> "responseFormat": "text",
> "systemPrompt": "You are a helpful assistant.",
> "userPrompt": "Analyze the following: {{input}}"
> },
> "enabled": true,
> "order": 0
> },
> {
> "name": "Format Output",
> "type": "transform-data",
> "config": {
> "outputVariable": "result",
> "script": "return { summary: variables.analysis }"
> },
> "enabled": true,
> "order": 1
> }
> ],
> "name": "Updated Flow Name"
>}'
1{
2 "createdAt": "string",
3 "draftVersionId": "string",
4 "flowSteps": [
5 {
6 "id": "string",
7 "type": "string",
8 "config": {},
9 "enabled": true,
10 "name": "string",
11 "order": 1
12 }
13 ],
14 "id": "string",
15 "name": "string",
16 "organizationId": "string",
17 "updatedAt": "string",
18 "userId": "string",
19 "dashboardUrl": "string",
20 "lastRunAt": "string",
21 "sampleMetadata": {},
22 "stepCount": 1
23}

Update a flow and/or its step definitions.

Was this page helpful?
Previous

Delete flow

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Request

This endpoint expects an object.
flowStepslist of objectsOptional
namestringOptional>=1 character

Response

Updated flow
createdAtstring
draftVersionIdstring
flowStepslist of objects
idstring
namestring
organizationIdstring or null
updatedAtstring
userIdstring
dashboardUrlstring
lastRunAtstring or null
sampleMetadatamap from strings to any
stepCountinteger

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error