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

Create flow

POST
/v1/flows
POST
/v1/flows
$curl -X POST https://api.runtype.com/v1/flows \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Customer Outreach Flow",
> "steps": [
> {
> "name": "Generate Greeting",
> "type": "prompt",
> "config": {
> "model": "gpt-4",
> "outputVariable": "greeting",
> "userPrompt": "Generate a personalized greeting for {{customer_name}} from {{company_name}}"
> },
> "enabled": true,
> "id": "greeting",
> "order": 1
> }
> ],
> "description": "Automated customer communication workflow"
>}'
1{
2 "createdAt": "string",
3 "flowSteps": [
4 {
5 "id": "string",
6 "type": "string",
7 "config": {},
8 "enabled": true,
9 "name": "string",
10 "order": 1
11 }
12 ],
13 "id": "string",
14 "name": "string",
15 "organizationId": "string",
16 "updatedAt": "string",
17 "userId": "string",
18 "dashboardUrl": "string",
19 "lastRunAt": "string",
20 "sampleMetadata": {},
21 "stepCount": 1
22}
Create a new flow with step definitions.
Was this page helpful?
Previous

Get flow details

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Request

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

Response

Created flow
createdAtstring
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
500
Internal Server Error