Docs
Add File Associations
POST /drives/{eventId}/files/{fileId}/associations
POST
/drives/{eventId}/files/{fileId}/associationsRequired Tokens
| Field | Type | Required | Description |
|---|---|---|---|
| Bearer | Authorization: Bearer <api-key> | Optional | Your API key. Pass it as the Bearer token on every request. |
| Event token | x-Event-Token | Optional | Run **Get Tokens** in the Authorization folder, or call `GET /Events/{eventId}/authorize` manually. |
Shares a file with users, collaborators, and/or areas by creating associations. Each association grants specific permissions and optionally designates the entity as a reviewer. Requires File.* (admin) permission on the file.
An entity can only be associated once per file — attempting to add a duplicate will return an error.
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| driveId | Guid | Required | The event ID. |
| fileId | Guid | Required | The file ID. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| users | array | Required | User associations. Can be empty (`[]`). See **Association Object**. |
| collaborators | array | Required | Collaborator associations. Can be empty (`[]`). See **Association Object**. |
| areas | array | Required | Area associations. Can be empty (`[]`). See **Association Object**. |
Association Object
| Field | Type | Required | Description |
|---|---|---|---|
| id | Guid | Required | The user ID, collaborator ID, or area ID. |
| permissions | array | Required | Permissions to grant. See **File Permissions** below. |
| isReviewer | bool | Required | Whether this entity is designated as a reviewer for approval workflows. |
File Permissions
| Value | Description |
|---|---|
File.* | Admin — full access including sharing and deletion. |
File.Read | Read-only access. |
File.Edit | Can upload new content and edit metadata. |
File.Delete | Can delete files. |
Response
201 Created — No response body.
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid token, or caller does not have File.* on this file. |
NOT_FOUND | 404 | File, collaborator, or area not found. |
BAD_REQUEST | 400 | Duplicate association — entity is already associated with this file. |