curl --request POST \
--url http://localhost:8080/api/v1/media \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file
{
"status": "success",
"data": {
"id": 123,
"created_at": "2025-08-28T10:00:00Z",
"updated_at": "2025-08-28T10:00:00Z",
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"store": "fs",
"filename": "example.jpg",
"content_type": "image/jpeg",
"content_id": "",
"model_id": 456,
"model_type": "messages",
"disposition": "attachment",
"size": 102400,
"meta": {
"width": 800,
"height": 600
},
"url": "/uploads/550e8400-e29b-41d4-a716-446655440000"
}
}
curl --request POST \
--url http://localhost:8080/api/v1/media \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file
{
"status": "success",
"data": {
"id": 123,
"created_at": "2025-08-28T10:00:00Z",
"updated_at": "2025-08-28T10:00:00Z",
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"store": "fs",
"filename": "example.jpg",
"content_type": "image/jpeg",
"content_id": "",
"model_id": 456,
"model_type": "messages",
"disposition": "attachment",
"size": 102400,
"meta": {
"width": 800,
"height": 600
},
"url": "/uploads/550e8400-e29b-41d4-a716-446655440000"
}
}
Basic authentication using base64 encoded API key and secret. Format: Authorization: Basic <base64(api_key:api_secret)>
Media upload
The body is of type object
.
Successful media upload response
The response is of type object
.
Was this page helpful?