Skip to main content
POST
Prepare a OneDrive or SharePoint upload for host file transport

Authorizations

Authorization
string
header
required

MCP access token issued by the Den OAuth authorization server, passed as Authorization: Bearer <token>. Used by MCP transports and the direct-upload routes they call.

Body

application/json
size
integer
required
Required range: 1 <= x <= 262144000
driveId
string

The file's driveId from a search, folder or link result. Omit for the member's own OneDrive.

Required string length: 1 - 512
itemId
string

Replace this existing file's content. It keeps its link and sharing; the previous version stays in its version history.

Required string length: 1 - 512
baseRevision
string

Required with itemId: the eTag your copy was downloaded from. Refused with drive_conflict when the file changed since; download it again and reapply the edits, or save a new file.

Required string length: 1 - 512
Pattern: ^[\x20-\x7e]+$
folderId
string

New files only: the folder to create the file in; omit for the top of the drive.

Required string length: 1 - 512
name
string

New files only: the file name.

Required string length: 1 - 255
conflictBehavior
enum<string>
default:fail

New files only: fail, or let Microsoft rename the file when the name is taken.

Available options:
fail,
rename
connectionId
string

Selected Microsoft 365 connection; omit for the default. Unavailable selections never fall back to another account.

Pattern: ^(microsoft-365|emc_[A-Za-z0-9]+)$

Response

Opaque upload token; file not yet uploaded.

ok
boolean
required
uploadToken
string
required

Opaque token for the relay route; Microsoft's session URL stays in OpenWork Cloud.

size
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
chunkSize
number
required
expiresAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
replaces
object

Present when the upload replaces an existing file's content.