Docs

Add File Version

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

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

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.

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

FieldTypeRequiredDescription
driveIdGuidRequiredThe event ID.
fileIdGuidRequiredThe file ID.

Request Body

FieldTypeRequiredDescription
fileFormatstringRequiredMIME type of the file being uploaded (e.g., `"application/pdf"`, `"image/png"`).
fileSizeintRequiredSize of the file in bytes. Must be greater than zero.

Example Response

{
  "sasUri": "https://storage.blob.core.windows.net/..."
}

Response Fields

FieldTypeDescription
sasUristringTime-limited write SAS URI. Upload the file binary to this URI via `PUT`.

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid token, or insufficient permissions.
NOT_FOUND404File not found in this drive.
BAD_REQUEST400Invalid file format or file size.