Upload File
POST
/api/v1/uploadsAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredRequest body
requiredmultipart/form-datafilestringrequiredResponses
201Successful Response
successbooleandefault: true
dataUploadedAsset | anyShow propertiesHide properties
Any of:
UploadedAsset
urlstringrequiredkeystringrequirednamestringrequiredsizeintegerrequiredcontent_typestringrequiredwidthinteger | anyShow propertiesHide properties
Any of:
integer
integerany
anyheightinteger | anyShow propertiesHide properties
Any of:
integer
integerany
anyany
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobjectRequest
curl -X POST "/api/v1/uploads" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: multipart/form-data" \
-d '{
"file": "string"
}'const response = await fetch("/api/v1/uploads", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "multipart/form-data"
},
body: JSON.stringify({
"file": "string"
})
});import requests
response = requests.post(
"/api/v1/uploads",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "multipart/form-data"
},
json={
"file": "string"
},
)Response
{
"success": true,
"data": {
"url": "string",
"key": "string",
"name": "string",
"size": 0,
"content_type": "string",
"width": 0,
"height": 0
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}