> ## 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.

# Attach knowledge

> Attach a knowledge item from the workspace library to an agent.

> [!NOTE]
>
> This endpoint is for the VIP plan only. Other plans get a `403`. See [Plan access](https://docs.nedzo.ai/api-reference/introduction.md#plan-access).

An agent answers questions from the knowledge items attached to it. Add items to the workspace's library first, in the dashboard or with the knowledge endpoints. The item must be in the agent's workspace.

## Path Parameters

**agentId** `string` *required*

Agent UUID

## Body

**knowledgeItemId** `string` *required*

A knowledge item in the agent's workspace.

We read the item's content and load it into the agent before we answer, so this can take a while for a large website or file. If the content cannot be read, nothing is attached. Returns `201` with the attached item.

If the request times out, [list the agent's knowledge](https://docs.nedzo.ai/api-reference/agents/knowledge/list.md) before you try again. The attach may have finished. A `409` means the item is already attached.

```bash cURL theme={null}
curl -X POST "https://api.nedzo.ai/v1/agents/123e4567-e89b-12d3-a456-426614174000/knowledge" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "knowledgeItemId": "7c9e6679-7425-40de-944b-e07fc1f90ae7" }'
```

```json 201 theme={null}
{ "knowledgeItemId": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "name": "Pricing FAQ", "type": "text", "attachedAt": "2026-10-11T10:00:00Z" }
```

## Errors

| Status | When |
| - | - |
| `400` | An id is not a valid UUID. |
| `404` | The agent or the item is not in your API key's scope. |
| `409` | The item is already attached. |
| `422` | The item's content could not be read, for example a website that blocks us. |


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