Upload File

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

Authentication

AuthorizationBearer

Use Bearer <api-key>.

Query parameters

spaceIdstring or "default"Optional

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

Created
contentTypestring>=1 character
createdAtdatetime
downloadUrlstring>=1 character
idstringformat: "uuid"
namestring>=1 character
pathstring>=1 character
sizeBytesinteger0-9007199254740991
sourceenum
spaceIdstringformat: "uuid"
expiresAtdatetime
metadataobject or null
runIdstringformat: "uuid"
runtimeIdstringformat: "uuid"
typestring1-64 characters

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error