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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
templateId | string | yes | min 1 |
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— OK400— Malformed request404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
curl "https://api.zapyflow.com.br/api/ai-agents/{id}/catalog-items" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | yes | min 1, max 150 |
description | string | no | max 1000 |
price | number | yes | ≥ 0 |
imageUrl | object | string | null | no | — |
category | object | string | null | no | — |
active | boolean | no | — |
order | integer | no | — |
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— Created404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
itemId | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | no | min 1, max 150 |
description | string | no | max 1000 |
price | number | no | ≥ 0 |
imageUrl | object | string | null | no | — |
category | object | string | null | no | — |
active | boolean | no | — |
order | integer | no | — |
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— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
itemId | path | yes |
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 sucesso404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
question | string | yes | min 1, max 500 |
answer | string | yes | min 1, max 2000 |
order | integer | no | ≥ 0 |
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— Created400— Malformed request
PATCH/api/ai-agents/{id}/faq/{faqId}
Edit an FAQ entry
Required scope: agents.write
| Parameter | In | Required |
|---|---|---|
id | path | yes |
faqId | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
question | string | no | min 1, max 500 |
answer | string | no | min 1, max 2000 |
order | integer | no | ≥ 0 |
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— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
faqId | path | yes |
curl -X DELETE "https://api.zapyflow.com.br/api/ai-agents/{id}/faq/{faqId}" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
orderedIds | string[] | yes | ≥ 1 items |
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— OK400— Malformed request
GET/api/ai-agents/{id}/knowledge
List the sources in the agent's knowledge base
Required scope: knowledge.read
| Parameter | In | Required |
|---|---|---|
id | path | yes |
curl "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK403— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
sourceId | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
enabled | boolean | yes | — |
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— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
sourceId | path | yes |
curl -X DELETE "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge/{sourceId}" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
sourceId | path | yes |
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge/{sourceId}/reindex" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | yes | min 1, max 120 |
content | string | yes | min 1, max 200000 |
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— Created409— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge/upload" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
201— Created400— Malformed request409— Conflict with the current state
POST/api/ai-agents/{id}/knowledge/url
Add a page (URL) to the knowledge base
Required scope: knowledge.write
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
url | string | yes | max 2000 |
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— Created400— Malformed request409— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
curl "https://api.zapyflow.com.br/api/ai-agents/{id}/metrics" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/upload-catalog" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK400— Malformed request404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
curl -X POST "https://api.zapyflow.com.br/api/ai-agents/{id}/upload-catalog-images" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK400— Malformed request404— 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
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
curl "https://api.zapyflow.com.br/api/ai-agents/templates" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK