# Remove from a Room (/docs/api-reference/detach_room_resource)

`POST /v1/rooms/{room_id}/attachments/{attachment_id}/detach` · operation `detach_room_resource`

Stops a Room pointing at a Business or List. Changes nothing else.

**Sign-in:** a signed-in person's access token (`Authorization: Bearer …`), which AI apps get through MCP sign-in; or a Workspace API key in the `X-SMB-API-Key` header.

### Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `room_id` | string | yes | Stable Room ID. |
| `attachment_id` | string | yes | From the Room's attachments. |

### Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `SMB-Workspace-Id` | string (uuid) | yes | Workspace where this operation runs. Required for user tokens and Workspace API keys. |
| `Idempotency-Key` | string | yes |  |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expected_revision` | integer | no |  |

### Response

**200** Successful authorized response.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `room` | object | yes |  |
| `room.room_id` | string | yes | Stable Room ID. |
| `room.business_id` | string or null | yes | The Business it was made for, or null. |
| `room.title` | string | yes |  |
| `room.purpose` | string or null | no |  |
| `room.status` | one of `active`, `archived` | yes |  |
| `room.revision` | integer | yes |  |
| `room.created_at` | string (date-time) | yes |  |
| `room.updated_at` | string (date-time) | yes |  |
| `room.archived_at` | string (date-time) or null | no |  |
| `room.access_level` | one of `view`, `edit`, `full_access` | yes |  |
| `room.general_access` | one of `business`, `invited`, `workspace` | yes | Who else can open it. |
| `room.general_access_level` | one of `view`, `edit`, `null` | yes |  |
| `room.attachments` | array of object | yes |  |
| `room.parent` | object or null | no | The Room this sub-room is inside, when you can open it; otherwise null. |
| `room.sub_room_count` | integer | no | Open sub-rooms inside this Room that you can see. |
| `room.can_be_starting_room` | boolean | no | Whether a link's Rooms can start from it for you (starts_from_room_id): an open Room you can edit, never one made for a customer. |
| `room.settings` | object | no |  |
| `room.url` | string (uri) | no | The Room in SMB, to open or share (get_room). |
| `action_receipt` | object | yes |  |
| `action_receipt.receipt_id` | string (uuid) | yes |  |
| `action_receipt.command_id` | string (uuid) | yes |  |
| `action_receipt.action` | string | yes |  |
| `action_receipt.workspace_id` | string (uuid) | yes |  |
| `idempotent_replay` | boolean | yes |  |
| `request_id` | string | yes |  |

### Errors

- `400` The request is invalid.
- `401` Authentication is required.
- `403` The caller is not authorized.
- `404` The resource was not found.
- `409` The resource revision or idempotency input conflicts.
- `413` The request body is too large.
- `415` The request must be JSON.
- `422` Required evidence is missing.
- `429` Rate limit reached; honor Retry-After.
- `500` The request could not be completed.
- `502` A dependency returned an invalid response.
- `503` The service is temporarily unavailable.

### Example

```bash
curl --request POST "https://api.smb.co/v1/rooms/$ROOM_ID/attachments/$ATTACHMENT_ID/detach" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header "SMB-Workspace-Id: $WORKSPACE_ID" \
  --header "Idempotency-Key: $IDEMPOTENCY_KEY" \
  --header "Content-Type: application/json" \
  --data '{}'
```