Knowledge Bases
Knowledge bases
PATCH/api/knowledge-bases/{id}/sources/{sourceId}
Enable, disable or rename a source
Required scope: knowledge.write
| Parameter | In | Required |
|---|---|---|
id | path | yes |
sourceId | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
enabled | boolean | no | — |
name | string | no | min 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— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
sourceId | path | yes |
bash
curl -X DELETE "https://api.zapyflow.com.br/api/knowledge-bases/{id}/sources/{sourceId}" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK404— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
sourceId | path | yes |
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 finished404— Not found — also returned when the resource belongs to another workspace409— Conflict with the current state
POST/api/knowledge-bases/{id}/sources/text
Add pasted text to a 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 |
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— Created404— Not found — also returned when the resource belongs to another workspace409— 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
| Parameter | In | Required |
|---|---|---|
id | path | yes |
bash
curl -X POST "https://api.zapyflow.com.br/api/knowledge-bases/{id}/sources/upload" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
201— Created400— Malformed request404— Not found — also returned when the resource belongs to another workspace409— Conflict with the current state
POST/api/knowledge-bases/{id}/sources/url
Add a page (URL) to a knowledge base
Required scope: knowledge.write
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
url | string | yes | max 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— Created400— Malformed request404— Not found — also returned when the resource belongs to another workspace409— Conflict with the current state