Docs
Add File
POST /drives/{eventId}/files
POST
/drives/{eventId}/filesRequired 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. |
Creates a new file in the drive. Returns the file ID and a time-limited SAS URI for uploading the file binary directly to Azure Blob Storage.
Two file types are supported:
File— a standard document or media file. ProvidefileFormatandfileSize.Deliverable— an approval-workflow file assigned to a collaborator. ProvideassignedToanddueDateinstead offileFormat/fileSize. Deliverables start with no uploaded content and track approval status.
After receiving the response, upload the file binary to the sasUri using an HTTP PUT request with the file content as the body and no Authorization header.
Paths are ID-based. Use / for the drive root. To place a file inside a folder, pass the folder's fullPath (e.g., /{folderId}).
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| driveId | Guid | Required | The event ID. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| partitionKey | Guid | Required | The partition to create the file in. Pass the event ID, collaborator ID, or area ID from **Get Partitions**. |
| type | string | Required | `"File"` or `"Deliverable"`. |
| name | string | Required | Display name for the file. |
| description | string | Optional | Optional description. |
| path | string | Required | Parent path where the file is created (e.g., `/` or `/{folderId}`). |
| fileFormat | string | Optional | MIME type of the file being uploaded (e.g., `"application/pdf"`, `"video/mp4"`). Required for `File` type. |
| fileSize | int | Optional | Size of the file in bytes. Required for `File` type. |
| assignedTo | Guid | Optional | ID of the collaborator assigned to deliver this file. Required for `Deliverable` type. |
| dueDate | DateTime | Optional | Due date for the deliverable (UTC). Required for `Deliverable` type. |
Example Response
{
"id": "019700aa-0001-7000-0000-000000000001",
"sasUri": "https://storage.blob.core.windows.net/..."
}
Response Fields
| Field | Type | Description |
|---|---|---|
| id | Guid | The newly created file's ID. |
| sasUri | string | Time-limited write SAS URI. Upload the file binary to this URI via `PUT`. Only returned for `File` type. |
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid token, or insufficient permissions (File.* or File.Edit required on the target path). |
NOT_FOUND | 404 | The specified assignedTo collaborator does not exist on this event. |
BAD_REQUEST | 400 | Invalid arguments — empty name, invalid type, or missing required fields for the file type. |