Media

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. Requires messages:create, or email:send for attachment media.

post/v1/media

Request

  • Base URL: https://api.samva.dev
  • URL: https://api.samva.dev/v1/media
  • Auth: API key in header x-api-key

Request body

filenamestring required
contentTypestring required
sizeBytesinteger required
purpose'attachment' | 'avatar' | 'review_evidence' required
checksumSha256string nullable

Response

CreatedMedia

idstring required
organizationIdstring required
status'pending' | 'uploading' | 'processing' | 'ready' | 'failed' | 'deleted' required
filenamestring required
contentTypestring required
sizeBytesnumber required
widthnumber nullable required
heightnumber nullable required
durationMsnumber nullable required
purpose'attachment' | 'avatar' | 'review_evidence' required
checksumSha256string nullable required
expiresAtstring nullable required
createdAtstring required
confirmedAtstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.