ZapyFlow/API documentationopenapi.json

Bots

Compatibility: legacy AI agent paths

POST/api/ai-agents/{id}/apply-template

Apply a template to the agent (overwrites configuration and FAQs)

Required scope: agents.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
templateIdstringyesmin 1
bash
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/apply-template" \
  -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

GET/api/ai-agents/{id}/catalog-items

List the agent's catalog items

Required scope: catalog.read

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

POST/api/ai-agents/{id}/catalog-items

Create a catalog item

Required scope: catalog.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
namestringyesmin 1, max 150
descriptionstringnomax 1000
pricenumberyes≥ 0
imageUrlobject | string | nullno—
categoryobject | string | nullno—
activebooleanno—
orderintegerno—
bash
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/catalog-items" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 201 — Created
  • 404 — Not found — also returned when the resource belongs to another workspace

PATCH/api/ai-agents/{id}/catalog-items/{itemId}

Edit a catalog item

Required scope: catalog.write

ParameterInRequired
idpathyes
itemIdpathyes

Request body

FieldTypeRequiredConstraints
namestringnomin 1, max 150
descriptionstringnomax 1000
pricenumberno≥ 0
imageUrlobject | string | nullno—
categoryobject | string | nullno—
activebooleanno—
orderintegerno—
bash
curl -X PATCH "https://api.zapyflow.com.br/api/ai-agents/{id}/catalog-items/{itemId}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 200 — OK
  • 404 — Not found — also returned when the resource belongs to another workspace

DELETE/api/ai-agents/{id}/catalog-items/{itemId}

Remove a catalog item without touching the provider's external resource

Required scope: catalog.write

ParameterInRequired
idpathyes
itemIdpathyes
bash
curl -X DELETE "https://api.zapyflow.com.br/api/ai-agents/{id}/catalog-items/{itemId}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 204 — CatalogItem removido com sucesso
  • 404 — Not found — also returned when the resource belongs to another workspace

POST/api/ai-agents/{id}/faq

Add an FAQ entry to the agent

Required scope: agents.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
questionstringyesmin 1, max 500
answerstringyesmin 1, max 2000
orderintegerno≥ 0
bash
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/faq" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 201 — Created
  • 400 — Malformed request

PATCH/api/ai-agents/{id}/faq/{faqId}

Edit an FAQ entry

Required scope: agents.write

ParameterInRequired
idpathyes
faqIdpathyes

Request body

FieldTypeRequiredConstraints
questionstringnomin 1, max 500
answerstringnomin 1, max 2000
orderintegerno≥ 0
bash
curl -X PATCH "https://api.zapyflow.com.br/api/ai-agents/{id}/faq/{faqId}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 200 — OK
  • 404 — Not found — also returned when the resource belongs to another workspace

DELETE/api/ai-agents/{id}/faq/{faqId}

Delete an FAQ entry

Required scope: agents.write

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

PATCH/api/ai-agents/{id}/faq/reorder

Reorder the agent's FAQ entries

Required scope: agents.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
orderedIdsstring[]yes≥ 1 items
bash
curl -X PATCH "https://api.zapyflow.com.br/api/ai-agents/{id}/faq/reorder" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 200 — OK
  • 400 — Malformed request

GET/api/ai-agents/{id}/knowledge

List the sources in the agent's knowledge base

Required scope: knowledge.read

ParameterInRequired
idpathyes
bash
curl "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 403 — Forbidden, or the key lacks this scope

PATCH/api/ai-agents/{id}/knowledge/{sourceId}

Enable or disable a source (without reindexing)

Required scope: knowledge.write

ParameterInRequired
idpathyes
sourceIdpathyes

Request body

FieldTypeRequiredConstraints
enabledbooleanyes—
bash
curl -X PATCH "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge/{sourceId}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 200 — OK
  • 404 — Not found — also returned when the resource belongs to another workspace

DELETE/api/ai-agents/{id}/knowledge/{sourceId}

Remove a source and its indexed chunks

Required scope: knowledge.write

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

POST/api/ai-agents/{id}/knowledge/{sourceId}/reindex

Reprocess a source (re-extract, re-chunk, re-embed)

Required scope: knowledge.write

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

POST/api/ai-agents/{id}/knowledge/text

Add pasted text to the knowledge base

Required scope: knowledge.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
namestringyesmin 1, max 120
contentstringyesmin 1, max 200000
bash
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge/text" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 201 — Created
  • 409 — Conflict with the current state

POST/api/ai-agents/{id}/knowledge/upload

Upload a file (PDF/DOCX/MD/HTML/TXT) to the knowledge base

Required scope: knowledge.write

ParameterInRequired
idpathyes
bash
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge/upload" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 201 — Created
  • 400 — Malformed request
  • 409 — Conflict with the current state

POST/api/ai-agents/{id}/knowledge/url

Add a page (URL) to the knowledge base

Required scope: knowledge.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
urlstringyesmax 2000
bash
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge/url" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 201 — Created
  • 400 — Malformed request
  • 409 — Conflict with the current state

GET/api/ai-agents/{id}/metrics

One agent's 7-day metrics for the overview screen

Required scope: agents.read

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

POST/api/ai-agents/{id}/upload-catalog

Upload a catalog as PDF or image

Required scope: catalog.write

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

POST/api/ai-agents/{id}/upload-catalog-images

Upload several catalog or menu images (max 6)

Required scope: catalog.write

ParameterInRequired
idpathyes
bash
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/upload-catalog-images" \
  -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/ai-agents/ai-adjust/scope

The fields AI-assisted editing actually writes

Required scope: agents.read

bash
curl "https://api.zapyflow.com.br/api/ai-agents/ai-adjust/scope" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK

GET/api/ai-agents/templates

List the agent templates available per business segment

Required scope: agents.read

bash
curl "https://api.zapyflow.com.br/api/ai-agents/templates" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK