POST/shares/{id}

Upload files to a shared path

Uploads one or more files to a shared path using multipart/form-data. The share must have write scope, and its associated user must have upload permission. Include files in the filenames array; each file must be unique and the array must contain at least one item.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
idstringrequired
The unique identifier of the share to upload files to.

Multipart form data containing one or more files in the filenames array.

filenamesarray<string>optional
Files to upload. Provide at least one file, and do not include duplicate files.

8 status codes
201Returns a JSON response object with `error` and `message` fields.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Returned when the request is invalid, such as when the file array is empty or contains duplicates.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Returned when the request is unauthorized.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Returned when the share lacks write scope or its associated user lacks upload permission.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
413Returned when the request exceeds the maximum allowed size.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
429Returned when too many requests have been made; you can retry the request later.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Returned when an internal server error occurs.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty

Error handling

A 400 is returned when the request is invalid, and a 401 when authentication is missing or invalid. A 403 is returned when the share lacks write scope or its associated user lacks upload permission; a 413 indicates that the maximum allowed size was exceeded. A 429 indicates too many requests, while a 500 indicates an internal server error. The id path parameter must identify the share.