REST reference

Flows

The Flows routes. Every body is JSON, and an error always comes back as an object with a code and a message.

GET

/v1/flows

List WhatsApp Flows

Response (object[])

idstringRequired
Zaiped id (flows)
namestringRequired
categoriesstring[]Required
status"local" | "draft" | "published" | "deprecated" | "blocked" | "throttled"Required
metaFlowIdstring
flowJsonstringRequired
validationErrorsobject[]
previewUrlstring
responseCountnumberRequired
updatedAtnumberRequired
curl -X GET "https://zaiped.com/v1/flows" \
  -H "Authorization: Bearer zp_..."
POST

/v1/flows

Create a Flow

Request body

namestringRequired
categoriesstring[]Required
flowJsonstring
librarystring
lang"pt-BR" | "en-US"
pushboolean

Response (object)

idstringRequired
Zaiped id (flows)
namestringRequired
categoriesstring[]Required
status"local" | "draft" | "published" | "deprecated" | "blocked" | "throttled"Required
metaFlowIdstring
flowJsonstringRequired
validationErrorsobject[]
previewUrlstring
responseCountnumberRequired
updatedAtnumberRequired
curl -X POST "https://zaiped.com/v1/flows" \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "…",
  "categories": []
}'
GET

/v1/flows/{flowId}

Get a Flow

Path parameters

flowIdstringRequired
The flow id, as returned by list_flows.

Response (object)

idstringRequired
Zaiped id (flows)
namestringRequired
categoriesstring[]Required
status"local" | "draft" | "published" | "deprecated" | "blocked" | "throttled"Required
metaFlowIdstring
flowJsonstringRequired
validationErrorsobject[]
previewUrlstring
responseCountnumberRequired
updatedAtnumberRequired
curl -X GET "https://zaiped.com/v1/flows/YOUR_FLOW_ID" \
  -H "Authorization: Bearer zp_..."
PUT

/v1/flows/{flowId}

Update a Flow

The JSON of a published flow is immutable at Meta; name and categories still change.

Path parameters

flowIdstringRequired
The flow id.

Request body

namestring
categoriesstring[]
flowJsonstring
pushboolean

Response (object)

idstringRequired
Zaiped id (flows)
namestringRequired
categoriesstring[]Required
status"local" | "draft" | "published" | "deprecated" | "blocked" | "throttled"Required
metaFlowIdstring
flowJsonstringRequired
validationErrorsobject[]
previewUrlstring
responseCountnumberRequired
updatedAtnumberRequired
curl -X PUT "https://zaiped.com/v1/flows/YOUR_FLOW_ID" \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE

/v1/flows/{flowId}

Delete a Flow

Path parameters

flowIdstringRequired
The flow id.

Response (object)

oktrueRequired
curl -X DELETE "https://zaiped.com/v1/flows/YOUR_FLOW_ID" \
  -H "Authorization: Bearer zp_..."
POST

/v1/flows/{flowId}/publish

Publish a Flow

Pushes the current JSON, requires zero validation errors and publishes.

Path parameters

flowIdstringRequired
The flow id.

Response (object)

oktrueRequired
curl -X POST "https://zaiped.com/v1/flows/YOUR_FLOW_ID/publish" \
  -H "Authorization: Bearer zp_..."
POST

/v1/flows/{flowId}/deprecate

Deprecate a published Flow

Path parameters

flowIdstringRequired
The flow id.

Response (object)

oktrueRequired
curl -X POST "https://zaiped.com/v1/flows/YOUR_FLOW_ID/deprecate" \
  -H "Authorization: Bearer zp_..."
GET

/v1/flows/{flowId}/responses

List responses to a Flow

Path parameters

flowIdstringRequired
The flow id.

Response (object)

rowsobject[]Required
truncatedbooleanRequired
curl -X GET "https://zaiped.com/v1/flows/YOUR_FLOW_ID/responses" \
  -H "Authorization: Bearer zp_..."
REST reference