ZapyFlow/API documentationopenapi.json

Knowledge Bases

Knowledge bases

PATCH/api/knowledge-bases/{id}/sources/{sourceId}

Enable, disable or rename a source

Required scope: knowledge.write

ParameterInRequired
idpathyes
sourceIdpathyes

Request body

FieldTypeRequiredConstraints
enabledbooleanno—
namestringnomin 1, max 120
bash
curl -X PATCH "https://api.zapyflow.com.br/api/knowledge-bases/{id}/sources/{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/knowledge-bases/{id}/sources/{sourceId}

Remove a source from the base

Required scope: knowledge.write

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

POST/api/knowledge-bases/{id}/sources/{sourceId}/reindex

Reprocess a source

Required scope: knowledge.write

ParameterInRequired
idpathyes
sourceIdpathyes
bash
curl -X POST "https://api.zapyflow.com.br/api/knowledge-bases/{id}/sources/{sourceId}/reindex" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 202 — Accepted — queued, not finished
  • 404 — Not found — also returned when the resource belongs to another workspace
  • 409 — Conflict with the current state

POST/api/knowledge-bases/{id}/sources/text

Add pasted text to a 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/knowledge-bases/{id}/sources/text" \
  -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
  • 409 — Conflict with the current state

POST/api/knowledge-bases/{id}/sources/upload

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

Required scope: knowledge.write

ParameterInRequired
idpathyes
bash
curl -X POST "https://api.zapyflow.com.br/api/knowledge-bases/{id}/sources/upload" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 201 — Created
  • 400 — Malformed request
  • 404 — Not found — also returned when the resource belongs to another workspace
  • 409 — Conflict with the current state

POST/api/knowledge-bases/{id}/sources/url

Add a page (URL) to a knowledge base

Required scope: knowledge.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
urlstringyesmax 2000
bash
curl -X POST "https://api.zapyflow.com.br/api/knowledge-bases/{id}/sources/url" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 201 — Created
  • 400 — Malformed request
  • 404 — Not found — also returned when the resource belongs to another workspace
  • 409 — Conflict with the current state