ZapyFlow/API documentationopenapi.json

Flows

Conversation flows

GET/api/flows

List an agent's flows

Required scope: flows.read

ParameterInRequired
aiAgentIdqueryyes
bash
curl "https://api.zapyflow.com.br/api/flows?aiAgentId=..." \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK

POST/api/flows

Create a conversation flow

Required scope: flows.write

Request body

FieldTypeRequiredConstraints
aiAgentIdstringyesmin 1
namestringyesmin 1, max 100
triggerobjectyes—
stepsobject[]yes≥ 1 items, ≤ 100 items
bash
curl -X POST "https://api.zapyflow.com.br/api/flows" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 201 — Created
  • 400 — Malformed request

GET/api/flows/{id}

One flow in detail

Required scope: flows.read

ParameterInRequired
idpathyes
bash
curl "https://api.zapyflow.com.br/api/flows/{id}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 404 — Not found — also returned when the resource belongs to another workspace

PATCH/api/flows/{id}

Update a flow

Required scope: flows.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
namestringnomin 1, max 100
triggerobjectno—
stepsobject[]no≥ 1 items, ≤ 100 items
activebooleanno—
status"DRAFT" | "ACTIVE" | "ATTENTION" | "ARCHIVED"no—
bash
curl -X PATCH "https://api.zapyflow.com.br/api/flows/{id}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 200 — OK
  • 400 — Malformed request
  • 404 — Not found — also returned when the resource belongs to another workspace
  • 412

DELETE/api/flows/{id}

Delete a flow

Required scope: flows.delete

ParameterInRequired
idpathyes
bash
curl -X DELETE "https://api.zapyflow.com.br/api/flows/{id}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 404 — Not found — also returned when the resource belongs to another workspace

PATCH/api/flows/{id}/toggle

Turn a flow on or off

Required scope: flows.publish

ParameterInRequired
idpathyes
bash
curl -X PATCH "https://api.zapyflow.com.br/api/flows/{id}/toggle" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 400 — Malformed request
  • 404 — Not found — also returned when the resource belongs to another workspace

GET/api/flows/overview

Flow KPIs (7 days) and runs per agent

Required scope: flows.read

ParameterInRequired
aiAgentIdqueryyes
bash
curl "https://api.zapyflow.com.br/api/flows/overview?aiAgentId=..." \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 404 — Not found — also returned when the resource belongs to another workspace