Add a File

Add a new file using a multipart/form-data POST containing the file's metadata and the file contents. The metadata part includes required properties such as the name, format, and parentFolderId. Use the special keyword "root" to add files to the root folder of a teamsite. The content part includes the file's binary content to be uploaded.

Use an optional query string parameter resolveNameCollision=true to automatically append an index such as (1)(2)(3) etc. until a name is found which does not conflict with an existing document in the folder.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Query Params
boolean

Optional query parameter. Accepts true or false, defaults to false.

Body Params
string

Json Object with 'name', 'parentFolderId' and 'format' like 'ppt' or 'doc'. Example: {"name" : "Big Presentation", "parentFolderId" : "root", "format": "ppt"}

file

File content bytes. Use a Content-Disposition that includes a 'filename' parameter to indicate this is file data. The specific filename value is ignored in favor of metadata.name.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json