---
title: "Remove a note's attachment"
method: DELETE
path: "/business/knowledge-hubs/{hubId}/attachments/{noteId}"
tags: ["Knowledge hubs"]
---

# Remove a note's attachment

`DELETE /business/knowledge-hubs/{hubId}/attachments/{noteId}`

## Request

- Base URL: `https://api.tryfuse.ai/api/v1`
- URL: `https://api.tryfuse.ai/api/v1/business/knowledge-hubs/{hubId}/attachments/{noteId}`
- Auth: HTTP basic

Deletes the document attached to a note. Be aware that this removes the WHOLE note from the hub — the note's `text` as well as the file — so if you only meant to drop the document, re-add the note afterwards with `PATCH /business/knowledge-hubs/{hubId}` (same `filename`, same `text`). A note that has no document is left untouched and answers 404 `ATTACHMENT_NOT_FOUND`. The hub's owner can delete, and so can anyone on the team when it is the team's shared hub, but not while the hub is `processing`.

Errors:
- `404` `KNOWLEDGE_HUB_NOT_FOUND` — No hub with that id, it was deleted, or it belongs to another team.
- `404` `NOTE_NOT_FOUND` — No note with that id on this hub.
- `404` `ATTACHMENT_NOT_FOUND` — The note has no document attached, so there is nothing to delete.
- `409` `KNOWLEDGE_HUB_NOT_READY` — The hub is processing a build, update or refresh.
- `403` `KNOWLEDGE_HUB_OWNER_ONLY` — You can read this teammate's hub, but it is not your team's shared hub, so only its owner can delete attachments.
- `422` `VALIDATION_FAILED` — hubId or noteId is not a 24-character hex id.
- `500` `UNEXPECTED_ERROR` — The stored file could not be removed; the note is kept — retry.
- `429` `RATE_LIMITED` — More than 30 knowledge-hub/campaign requests in a minute (or 1000 in a day). Knowledge hubs share the campaigns bucket.

Requires one of the following token scopes: campaigns.

## Path parameters

- `hubId` string, required: 24-character hex id of the knowledge hub (from GET /business/knowledge-hubs).
- `noteId` string, required: 24-character hex id of the note (notes[].id in GET /business/knowledge-hubs/{hubId}).

## Response `204`

Deleted

## Other responses

- `400`: Error
- `401`: Error
- `402`: Error
- `403`: Error
- `404`: Error
- `409`: Error
- `422`: Error
- `429`: Error
- `500`: Error

---

[API](https://skmtc.dev/fuseai/apis/fuse-business-api.md) · [All operations](https://skmtc.dev/fuseai/apis/fuse-business-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fuseai/apis/fuse-business-api/revisions/50d95e0536f4?raw)
