> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nedzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update knowledge

> Rename a knowledge item or change its content through the Nedzo REST API. Agents that use it get the new content.

<Note>
  This endpoint is for the VIP plan only. Other plans get a `403`. See [Plan access](/api-reference/introduction#plan-access).
</Note>

Change the name, or the content that fits the item's type. You can't change the type. Send only the fields you want to change.

When the content changes, we read the new content first. If we can't read it, nothing changes. Then every agent that uses the item gets the new content.

When we refuse a new 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.

## Path Parameters

<ParamField path="id" type="string" required>
  The knowledge item ID.
</ParamField>

## Body Parameters

<ParamField body="name" type="string" optional>
  A new name, 1 to 255 characters.
</ParamField>

<ParamField body="websiteUrl" type="string" optional>
  `website` items only. A new public web page.
</ParamField>

<ParamField body="textContent" type="string" optional>
  `text` items only. New text, up to 500,000 characters.
</ParamField>

<ParamField body="fileUrl" type="string" optional>
  `file` items only. The `fileUrl` from a new upload link. Send it with `fileName`.
</ParamField>

<ParamField body="fileName" type="string" optional>
  `file` items only. Send it with `fileUrl`.
</ParamField>

## Errors

| Status | When |
| - | - |
| `400` | No field was sent, a field does not fit the item's type, `fileUrl` and `fileName` were not sent together, the `fileUrl` is not from an upload link for this workspace, no file was uploaded there yet, the new file is over 5 MB or has a different extension than `fileName`, or the new content can't be used. |
| `402` | The account has no plan, or its subscription is not active. |
| `404` | The item does not exist, was deleted, or is not in your API key's scope. |
| `403` | The workspace is locked. The answer has `workspaceLocked: true`. |
| `502` | We could not check the uploaded file or its size, or we could not read the new content. Nothing changed. Or the item was saved but some agents did not get the new content. The message says which. In the last case, send the same update again. |

<RequestExample>
  ```bash theme={null}
  curl -X PATCH "https://api.nedzo.ai/v1/knowledge/33333333-3333-4333-8333-333333333333" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "textContent": "We are open 8 to 6, Monday to Saturday." }'
  ```
</RequestExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.