Docs

Add File Associations

POST /drives/{eventId}/files/{fileId}/associations

POST/drives/{eventId}/files/{fileId}/associations

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Event tokenx-Event-TokenOptionalRun **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

FieldTypeRequiredDescription
driveIdGuidRequiredThe event ID.
fileIdGuidRequiredThe file ID.

Request Body

FieldTypeRequiredDescription
usersarrayRequiredUser associations. Can be empty (`[]`). See **Association Object**.
collaboratorsarrayRequiredCollaborator associations. Can be empty (`[]`). See **Association Object**.
areasarrayRequiredArea associations. Can be empty (`[]`). See **Association Object**.

Association Object

FieldTypeRequiredDescription
idGuidRequiredThe user ID, collaborator ID, or area ID.
permissionsarrayRequiredPermissions to grant. See **File Permissions** below.
isReviewerboolRequiredWhether this entity is designated as a reviewer for approval workflows.

File Permissions

ValueDescription
File.*Admin — full access including sharing and deletion.
File.ReadRead-only access.
File.EditCan upload new content and edit metadata.
File.DeleteCan delete files.

Response

201 Created — No response body.

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid token, or caller does not have File.* on this file.
NOT_FOUND404File, collaborator, or area not found.
BAD_REQUEST400Duplicate association — entity is already associated with this file.