ZapyFlow/API documentationopenapi.json

Knowledge

Knowledge sources

PUT/api/ai-agents/{id}/knowledge-bases

Set which bases this agent reads

Required scope: knowledge.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
baseIdsstring[]yes≤ 20 items
bash
curl -X PUT "https://api.zapyflow.com.br/api/ai-agents/{id}/knowledge-bases" \
  -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
  • 422 — Understood, but rejected by a rule

GET/api/knowledge-bases

The team's knowledge bases

Required scope: knowledge.read

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

POST/api/knowledge-bases

Create a knowledge base

Required scope: knowledge.write

Request body

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

PATCH/api/knowledge-bases/{id}

Rename a knowledge base or edit its description

Required scope: knowledge.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
namestringnomin 1, max 80
descriptionstringnomax 500
bash
curl -X PATCH "https://api.zapyflow.com.br/api/knowledge-bases/{id}" \
  -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
  • 409 — Conflict with the current state

DELETE/api/knowledge-bases/{id}

Delete an empty knowledge base

Required scope: knowledge.write

ParameterInRequired
idpathyes
bash
curl -X DELETE "https://api.zapyflow.com.br/api/knowledge-bases/{id}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 204 — No content
  • 404 — Not found — also returned when the resource belongs to another workspace
  • 409 — Conflict with the current state

GET/api/knowledge-bases/{id}/sources

The sources in a knowledge base

Required scope: knowledge.read

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