Skip to content

Upload Files

POST /api/v1/projects/{slug}/storage/upload

Headers:

Authorization: Bearer {accessToken}
Content-Type: multipart/form-data

Form fields:

FieldTypeRequiredDescription
fileFileYesThe file to upload
pathstringNoCustom storage path (default: {uuid}.{ext})
contentTypestringNoOverride MIME type
publicbooleanNoMake publicly accessible (default: true)

Response:

{
"url": "https://cdn.aerostack.dev/projects/{slug}/{path}",
"key": "projects/{slug}/{path}",
"size": 204800,
"contentType": "image/jpeg",
"createdAt": "2026-03-04T12:00:00Z"
}
StatusErrorDescription
400MISSING_FILENo file provided in form data
400FILE_TOO_LARGEFile exceeds 100 MB limit
401UNAUTHORIZEDMissing or invalid token
413Request body too large