API ReferenceUploads
Complete a media upload session
Marks a direct upload as complete and returns the finalized media asset URL.
Marks a direct upload as complete and returns the finalized media asset URL.
Authorization
BearerAuth AuthorizationBearer <token>
API key from the PostMantis dashboard.
In: header
Path Parameters
id*string
Media asset identifier.
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/json
curl -X POST "https://postmantis.com/api/uploads/8f5f3f18-3cf7-4aa8-a0ea-6fd204d4c4f1/complete" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "asset_id": "8f5f3f18-3cf7-4aa8-a0ea-6fd204d4c4f1", "status": "completed", "filename": "launch-card.png", "content_type": "image/png", "size_bytes": 481233, "upload_url": null, "upload_method": null, "upload_headers": {}, "expires_at": null, "url": "https://cdn.postmantis.com/media/launch-card.png", "created_at": "2026-03-29T09:30:00Z", "completed_at": "2026-03-29T09:31:00Z" }}{ "type": "https://postmantis.com/problems/invalid-request", "title": "Invalid request", "status": 400, "detail": "The request payload failed validation.", "code": "invalid_request"}{ "type": "https://postmantis.com/problems/unauthorized", "title": "Unauthorized", "status": 401, "detail": "Missing or invalid API key.", "code": "unauthorized"}{ "type": "https://postmantis.com/problems/forbidden", "title": "Forbidden", "status": 403, "detail": "The authenticated API key is not allowed to perform this action.", "code": "forbidden"}{ "type": "https://postmantis.com/problems/upload-not-found", "title": "Upload not found", "status": 404, "detail": "Upload not found.", "code": "upload_not_found"}{ "type": "https://postmantis.com/problems/upload-not-ready", "title": "Upload not ready", "status": 409, "detail": "Upload cannot be completed from its current state.", "code": "upload_not_ready"}{ "error": "Too Many Requests"}