curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "website",
"name": "Pricing page",
"websiteUrl": "https://example.com/pricing"
}'
curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"name": "Opening hours",
"textContent": "We are open 9 to 5, Monday to Friday."
}'
curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "file",
"name": "Price list",
"fileUrl": "FILE_URL_FROM_THE_UPLOAD_LINK",
"fileName": "price-list.pdf"
}'
{
"id": "33333333-3333-4333-8333-333333333333",
"workspaceId": "22222222-2222-4222-8222-222222222222",
"name": "Opening hours",
"type": "text",
"websiteUrl": null,
"fileUrl": null,
"fileName": null,
"textContent": "We are open 9 to 5, Monday to Friday.",
"agents": [],
"createdAt": "2026-10-11T10:00:00Z",
"updatedAt": "2026-10-11T10:00:00Z"
}
Knowledge
Add knowledge
Add a website, a text or a file to the knowledge library of a workspace through the Nedzo REST API.
POST
/
knowledge
curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "website",
"name": "Pricing page",
"websiteUrl": "https://example.com/pricing"
}'
curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"name": "Opening hours",
"textContent": "We are open 9 to 5, Monday to Friday."
}'
curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "file",
"name": "Price list",
"fileUrl": "FILE_URL_FROM_THE_UPLOAD_LINK",
"fileName": "price-list.pdf"
}'
{
"id": "33333333-3333-4333-8333-333333333333",
"workspaceId": "22222222-2222-4222-8222-222222222222",
"name": "Opening hours",
"type": "text",
"websiteUrl": null,
"fileUrl": null,
"fileName": null,
"textContent": "We are open 9 to 5, Monday to Friday.",
"agents": [],
"createdAt": "2026-10-11T10:00:00Z",
"updatedAt": "2026-10-11T10:00:00Z"
}
This endpoint is for the VIP plan only. Other plans get a
403. See Plan access.type to website, text or file, and send the field for that type. An item does nothing until an agent uses it.
To add a file:
- Get an upload link from Get a file upload link.
PUTthe file to theuploadUrl.- Send the
fileUrlandfileNamehere.
fileUrl must come from an upload link for the same workspace. A link to a file somewhere else is refused. The file can be up to 5 MB, and fileName must have the same extension as the upload.
Anyone with the fileUrl can open the file.
When we refuse a file because it is over 5 MB, we remove the uploaded file. For any other refusal, the file stays, so you can fix the request and send it again with the same fileUrl.
Your plan sets how many knowledge items the account can have. The count covers every workspace in the account.
workspaceId is required for account-scoped API keys and taken from the key for workspace-scoped keys. See Workspace ID and Request Scope.Body Parameters
string
The workspace. Required for an account-scoped key.
string
required
website, text or file.string
required
A name for the item, 1 to 255 characters.
string
For a
website item. A public web page. We add https:// when you leave it out. A private or local address is refused.string
For a
text item. Up to 500,000 characters.string
For a
file item. The fileUrl from your upload link, after the upload is done.string
For a
file item. The file name, with its extension: pdf, docx, txt, md or csv.Errors
| Status | When |
|---|---|
400 | A field is missing or does not fit the type, the website address is not allowed, the file type is not supported, the fileUrl is not from an upload link for this workspace, fileName has a different extension than the upload, no file was uploaded there yet, the file is over 5 MB, or the plan limit is reached. |
402 | The account has no plan, or its subscription is not active. |
404 | The workspace is not in your API key’s scope. |
403 | The workspace is locked. The answer has workspaceLocked: true. |
502 | We could not check the plan limit, the workspace or the uploaded file, or its size. Try again. |
curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "website",
"name": "Pricing page",
"websiteUrl": "https://example.com/pricing"
}'
curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"name": "Opening hours",
"textContent": "We are open 9 to 5, Monday to Friday."
}'
curl -X POST "https://api.nedzo.ai/v1/knowledge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "file",
"name": "Price list",
"fileUrl": "FILE_URL_FROM_THE_UPLOAD_LINK",
"fileName": "price-list.pdf"
}'
{
"id": "33333333-3333-4333-8333-333333333333",
"workspaceId": "22222222-2222-4222-8222-222222222222",
"name": "Opening hours",
"type": "text",
"websiteUrl": null,
"fileUrl": null,
"fileName": null,
"textContent": "We are open 9 to 5, Monday to Friday.",
"agents": [],
"createdAt": "2026-10-11T10:00:00Z",
"updatedAt": "2026-10-11T10:00:00Z"
}
Was this page helpful?
