Docs
Add File Version
POST /drives/{eventId}/files/{fileId}/versions
POST
/drives/{eventId}/files/{fileId}/versionsRequired 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. |
Uploads a new version of a file. The version tag is auto-generated (e.g., "Version 2", "Version 3") based on the highest existing version number.
Returns a SAS URI for uploading the file binary. After receiving the response, upload the file to the sasUri using an HTTP PUT request with the file content as the body and no Authorization header.
Requires File.* or File.Edit permission on the file.
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| driveId | Guid | Required | The event ID. |
| fileId | Guid | Required | The file ID. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| fileFormat | string | Required | MIME type of the file being uploaded (e.g., `"application/pdf"`, `"image/png"`). |
| fileSize | int | Required | Size of the file in bytes. Must be greater than zero. |
Example Response
{
"sasUri": "https://storage.blob.core.windows.net/..."
}
Response Fields
| Field | Type | Description |
|---|---|---|
| sasUri | string | Time-limited write SAS URI. Upload the file binary to this URI via `PUT`. |
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid token, or insufficient permissions. |
NOT_FOUND | 404 | File not found in this drive. |
BAD_REQUEST | 400 | Invalid file format or file size. |