Appearance
Confirm upload
Confirm that a media file has been successfully uploaded. This marks the file as active and returns the public URL that can be used in posts.
Important: Call this endpoint only after successfully uploading the file to the presigned URL. The system will verify the file exists in storage before confirming.
POST/v1/media/{id}/confirm
Path Parameters
idstring
Request Body
application/json
size?integer
The file size in bytes. If provided, it will be stored for reference.
Range0 < value
Response Body
200application/json
400application/json
403application/json
404application/json
500application/json
JavaScript
Go
Java
C#
cURL
TypeScript
Python
Swift
const body = JSON.stringify({})
fetch(" {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body
})200400403404500
{
"success": true,
"data": {
"id": "9dyJS",
"filename": "product-image.jpg",
"url": "
"content_type": "image/jpeg",
"size": 1024000,
"status": "active",
"created_at": "2025-01-15T10:30:00Z",
"expires_at": "2025-03-16T10:30:00Z"
}
}{
"success": false,
"error": "Invalid request",
"details": {
"filename": {
"_errors": [\
"Required"\
]
}
}
}{
"success": false,
"error": "Invalid request",
"details": {
"filename": {
"_errors": [\
"Required"\
]
}
}
}{
"success": false,
"error": "Invalid request",
"details": {
"filename": {
"_errors": [\
"Required"\
]
}
}
}{
"success": false,
"error": "Internal server error",
"message": "Failed to generate upload URL"
}Get upload URL POST\ \ Previous Page Get media file GET\ \ Next Page