Create or update a file
Creates or updates/overwrites an existing file. The body of the request must contain the content of the file being uploaded. Requires write permission.
If the file already exist, it's content, metadata and fields will be replaced by the new values. Fields and metadata will not be merged. Note that the fileId will remain the same.
The Content-Type used during creation of a file will be the same Content-Type header included in responses when downloading the file.
Setting Metadata and Dynamic Fields
Use request header h-metadata-[key] to add metadata to the file. These headers will be included in the response when downloading the file.
Use request header h-field-[key] to add dynamic fields to the file. They are not included in the response when doanloading the file, but are available in the Graph.
Parameters
Path Parameters
The space to put the file in. Spaces are created implicitly upon the first file being added. Must be a non-empty string containing a-z, 0-9, period or underscore.
The key of the file. Is used to reference the file specific file. Can include forward slash to simulate a path. Each segment of the path must be a non-empty string containing a-z, 0-9, period or underscore. A segment of "." or ".." is not allowed.
Responses
OK