Upload File

View as Markdown
Upload a file into a space and return the canonical v2 file resource.

Authentication

AuthorizationBearer

Use Bearer <api-key>.

Query parameters

spaceIdstringRequiredformat: "uuid"

Request

This endpoint expects a multipart form containing a file.
filefileRequired
File bytes to upload.
metadatastringOptional

Optional JSON object string with caller-owned file metadata.

namestringOptional<=255 characters
Optional display filename.
pathstringOptional<=4096 characters
Optional relative destination path. Must not be absolute or contain . or .. path segments.

Response

Default Response
contentTypestring>=1 character
createdAtstring
idstringformat: "uuid"
namestring>=1 character
pathstring>=1 character
sizeBytesinteger0-9007199254740991
sourceenum
Allowed values:
typestring>=1 character
downloadUrlstring
expiresAtstring or null
metadataobject or null
runIdstring or nullformat: "uuid"
runtimeIdstring or nullformat: "uuid"
spaceIdstringformat: "uuid"