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

# Unlink memory collection from agent

> Unlinks a memory collection from an agent. The collection and its memories are kept.

Linked collections are always active in every chat with the agent, for everyone who uses it. Nobody has to turn them on in the chat.

The collection stops being used in chats with the agent. It is not deleted, and its memories are kept.

Only agent editors can call this endpoint: the agent creator, or a member with permission to manage workspace documents. The token needs the `use_agents` ability, and the workspace needs memory enabled.

**x-workspace-id** `integer`

ID of the workspace. If not provided, your selected workspace is used.

**agentId** `integer` *required*

ID of the agent.

**collectionId** `integer` *required*

ID of the linked memory collection.

**data** `object[]`

Every collection linked to the agent after the call.

**properties**

**id** `integer`

Collection ID.

**title** `string`

Collection name.

**mine** `boolean`

`true` when you own the collection.

## Errors

* `403`: You are not an editor of the agent, or you do not have the memory permission in the workspace.
* `404`: The agent was not found in the workspace, or memory is turned off for the workspace.

```bash cURL theme={null}
curl --request DELETE \
  --url 'https://api.tess.im/agents/4281/memory-collections/312' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'x-workspace-id: YOUR_WORKSPACE_ID'
```

```json 200 theme={null}
{
  "data": [
    {
      "id": 318,
      "title": "Pricing rules",
      "mine": false
    }
  ]
}
```


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