Skip to content
SociaMesh

Media

Upload files or hand over URLs; every file is checked before it's used.

Upload

  1. POST /v1/media/upload with { filename, mimeType, sizeBytes, altText? }. The answer has an uploadUrl and the exact uploadHeaders to use.
  2. PUT the bytes to uploadUrl with those headers (it expires; see expiresAt).
  3. POST /v1/media/{id}/complete. SociaMesh checks the real file type, size, dimensions and duration, then the media becomes ready.

The TypeScript SDK does all three: sm.media.uploadFile(file, { filename, mimeType }).

From a URL

POST /v1/media/ingest with { url, altText? }, or put mediaItems: [{ url, type }] straight in a post. SociaMesh downloads it (public https only) and checks it the same way.

Use it

Reference mediaIds in a post. A post whose media isn't ready yet waits for it, then publishes. Each platform's limits (types, sizes, aspect ratios, durations) are on its platform page, and validation reports any file a platform won't take.

Unused media is deleted after the retention period. DELETE /v1/media/{id} removes it sooner.