Create a media object
Creates the media object in the pending state and returns it with the upload instruction; URL, method, and headers; for putting its bytes into storage.
Creates the media object in the pending state and returns it with the upload instruction — URL, method, and headers — for putting its bytes into storage.
Authorization
apiKey In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= length <= 2551 <= length <= 1270 < value <= 26214400Value in
- "attachment"
- "avatar"
- "review_evidence"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/media" \ -H "Content-Type: application/json" \ -d '{ "filename": "string", "contentType": "string", "sizeBytes": 1, "purpose": "attachment" }'{ "id": "string", "organizationId": "string", "status": "pending", "filename": "string", "contentType": "string", "sizeBytes": 0, "width": 1, "height": 1, "durationMs": 0, "purpose": "attachment", "checksumSha256": "string", "expiresAt": "string", "createdAt": "string", "confirmedAt": "string", "upload": { "url": "string", "method": "PUT", "headers": { "property1": "string", "property2": "string" }, "expiresAt": "string" }}Related documentation
Complete a media upload
Verifies the uploaded object exists in storage, marks the media object ready, and returns it with a download URL.
Get a media download URL
Generates a presigned, time-limited download URL for a ready media object. Use this endpoint to get a media download URL through the Samva email API.