Create or overwrite file

Create a non-empty file or overwrite a file.

If the parent folder of the path parameter doesn’t exist, the file system creates it before creating the file.

Ensure the path is accessible within the context defined by the IB-Context header.

Path parameters

pathstringRequired
Full path to the file.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

IB-ContextstringOptional

Specify whether to use your community account or organization account to complete the request. To use your community account, define as your user ID. To use your organization account, define as your organization ID. If unspecified, defaults to community account context. See Authorization and context identification for details.

Request

This endpoint expects binary data of type bytes.

Response

The request succeeded and a new file was created at the target location. AI Hub returns this status code only when the request includes an If-None-Match header with a value of *.

Errors