Flows API
List flows
Newest first. The flow body is left out of the list; fetch one flow for it.
Query parameters
Default 50
Returns
200 with the fields below.
Flows, newest first. The flow body is left out; fetch one flow for it.
8 properties
The flow's id.
The flow's id. Same value as `id`.
Display name.
How many nodes the flow has.
The language the flow's text is written in.
The flow's save counter. It goes up each time the flow body changes.
Creation time in milliseconds since the Unix epoch.
Time of the last change in milliseconds since the Unix epoch.
True if more flows remain.
Pass as `pagination_key` to get the next page. Null on the last page.
curl "https://api.dialgem.com/v1/flows" \
-H "X-API-Key: $DIALGEM_API_KEY"{
"flows": [
{
"id": "string",
"flow_id": "flow_123",
"name": "Example",
"language": "string",
"version": 0,
"node_count": 0,
"created_timestamp": 0,
"last_modification_timestamp": 0
}
],
"has_more": false,
"pagination_key": "string"
}Create flow
Validate and save a flow. A flow with only warnings saves and returns them in `flow_validation`.
Request body application/json
Default "en"
Returns
201 with the fields below.
The flow's id.
The flow's id. Same value as `id`.
Display name.
How many nodes the flow has.
The flow body: its nodes, edges and settings.
The language the flow's text is written in.
The flow's save counter. It goes up each time the flow body changes.
Creation time in milliseconds since the Unix epoch.
Time of the last change in milliseconds since the Unix epoch.
Present only when the flow was saved with warnings.
1 properties
Warnings found in the flow. The flow was still saved. Each issue says where the problem is and what it is.
curl -X POST "https://api.dialgem.com/v1/flows" \
-H "X-API-Key: $DIALGEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Example",
"flow_config": {}
}'{
"id": "string",
"flow_id": "flow_123",
"name": "Example",
"language": "string",
"version": 0,
"node_count": 0,
"created_timestamp": 0,
"last_modification_timestamp": 0,
"flow_config": {},
"flow_validation": {
"issues": [
{}
]
}
}Get flow
Path parameters
Returns
200 with the fields below.
The flow's id.
The flow's id. Same value as `id`.
Display name.
How many nodes the flow has.
The flow body: its nodes, edges and settings.
The language the flow's text is written in.
The flow's save counter. It goes up each time the flow body changes.
Creation time in milliseconds since the Unix epoch.
Time of the last change in milliseconds since the Unix epoch.
Present only when the flow was saved with warnings.
1 properties
Warnings found in the flow. The flow was still saved. Each issue says where the problem is and what it is.
curl "https://api.dialgem.com/v1/flows/FLOW_ID" \
-H "X-API-Key: $DIALGEM_API_KEY"{
"id": "string",
"flow_id": "flow_123",
"name": "Example",
"language": "string",
"version": 0,
"node_count": 0,
"created_timestamp": 0,
"last_modification_timestamp": 0,
"flow_config": {},
"flow_validation": {
"issues": [
{}
]
}
}Update flow
Rename a flow and/or replace its body. The body is validated again, whether or not it changed.
Path parameters
Request body application/json
23 properties
21 properties
Show 11 more parameters
One of user, agent
3 properties
2 properties
Show 13 more parameters
11 properties
2 properties
5 properties
Returns
200 with the fields below.
The flow's id.
The flow's id. Same value as `id`.
Display name.
How many nodes the flow has.
The flow body: its nodes, edges and settings.
The language the flow's text is written in.
The flow's save counter. It goes up each time the flow body changes.
Creation time in milliseconds since the Unix epoch.
Time of the last change in milliseconds since the Unix epoch.
Present only when the flow was saved with warnings.
1 properties
Warnings found in the flow. The flow was still saved. Each issue says where the problem is and what it is.
curl -X PATCH "https://api.dialgem.com/v1/flows/FLOW_ID" \
-H "X-API-Key: $DIALGEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Example"
}'{
"id": "string",
"flow_id": "flow_123",
"name": "Example",
"language": "string",
"version": 0,
"node_count": 0,
"created_timestamp": 0,
"last_modification_timestamp": 0,
"flow_config": {},
"flow_validation": {
"issues": [
{}
]
}
}Delete flow
Delete a saved flow. Agents it was attached to keep their copy.
Path parameters
Returns
200 with the fields below.
Always true on success.
The id that was deleted.
curl -X DELETE "https://api.dialgem.com/v1/flows/FLOW_ID" \
-H "X-API-Key: $DIALGEM_API_KEY"{
"deleted": false,
"id": "string"
}