# Share it (/docs/api-reference/share_access)

`POST /v1/access` · operation `share_access`

Shares a Room, folder, File, task or goal with someone, or changes their level. A folder or File shared with someone outside gives them just that. A Room is shared by email (it sends an invitation). Needs Full access (a task or goal: also whoever made it). Requires explicit user intent.

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

### 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 |
| --- | --- | --- | --- |
| `object_type` | one of `room`, `room_folder`, `room_file`, `file`, `task`, `goal` | yes | What to share: a Room, a folder, a Room file, a File, a task or a goal. |
| `object_id` | string | yes | Its ID: rom_, rfd_, rfl_, fil_, tsk_ or gol_. |
| `to` | object or object or object or object | yes | Who: a person by email or account, a Workspace you are in, or (tasks and goals) everyone in their Room. |
| `access_level` | one of `view`, `edit`, `full_access` | yes |  |

### Response

**200** The existing resource or idempotent replay was returned. · **201** The resource was created.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `subject` | object | yes |  |
| `subject.type` | string | yes | user, person (an invitation by email), workspace or room. |
| `subject.id` | string | yes |  |
| `subject.label` | string | yes |  |
| `subject.email` | string | no |  |
| `access_level` | one of `view`, `edit`, `full_access` | yes |  |
| `source_type` | string | yes | Where it comes from: given here (api, participant, invite), inherited from a folder above, or room (everyone who can open the Room). |
| `inherited_from` | object | no |  |
| `inherited_from.type` | one of `room_folder`, `room` | yes |  |
| `inherited_from.id` | string | yes |  |
| `inherited_from.name` | string | no |  |
| `created_at` | string | 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/access" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header "SMB-Workspace-Id: $WORKSPACE_ID" \
  --header "Idempotency-Key: $IDEMPOTENCY_KEY" \
  --header "Content-Type: application/json" \
  --data '{"object_type":"room","object_id":"…","to":"…","access_level":"view"}'
```