Skip to Content
GrowSocmedDocsSocial media command center

Media

Upload photos, videos and PDF documents into the media library, in one request, in parts, from a URL, or through an upload link.

Posts, ideas and DMs use files from the workspace's media library by their id. After an upload, each file is checked in the background (type, size, dimensions, duration); its status goes from pending to ready, or to failed with a fail_reason. Only ready files can be posted.

TypeFormatsLargest file
ImageJPEG, PNG8 MB
VideoMP4, MOVyour plan's video limit (at most 2 GB)
DocumentPDF (LinkedIn document posts)100 MB

Uploads also count against the plan's storage and its uploads per hour. Each platform then has its own limits, see Platforms.

Four ways to upload

One request (up to 100 MB)

curl -X POST https://socmed.growpaces.com/api/v1/media/upload \
  -H "Authorization: Bearer gs_..." \
  -F "file=@photo.jpg"

The response is 201 with the new media (status pending). Files over 100 MB are refused with 413; use parts.

In parts (large videos)

  1. Start: POST /media/uploads with file_name, mime_type and size_bytes. The answer gives the media id, part_size (16 MB) and part_count.
  2. Send each part as raw bytes: PUT /media/{id}/parts/{n}, numbered from 1. Every part is exactly part_size bytes except the last. Parts can be sent in any order and sent again.
  3. Finish: POST /media/{id}/complete. The parts are joined and the file is checked. A missing part gives 409 conflict with details.missing_parts.
# part 1 of a 40 MB video (part_size 16777216)
curl -X PUT https://socmed.growpaces.com/api/v1/media/0193…/parts/1 \
  -H "Authorization: Bearer gs_..." \
  --data-binary @part-1.bin

From a public URL

POST /media/from-url with url (and optionally file_name) copies a JPEG, PNG, MP4 or MOV from a public https:// address. Up to three redirects are followed; addresses on private networks are refused. A video's server must send its size (Content-Length).

POST /media/upload-links returns an upload_url that uploads into the workspace without any other credential: handy for an AI agent that can run a terminal command, or for a person you send it to.

# one or more files, up to 100 MB each (at most 10 per request)
curl -F "file=@photo.jpg" https://socmed.growpaces.com/api/public/uploads/…

# a bigger video: the raw bytes, with its name
curl -X PUT --data-binary @video.mp4 "https://socmed.growpaces.com/api/public/uploads/…?name=video.mp4"

A link works for 30 minutes after its last use, and at most 6 hours after it was made. Treat it like a password while it works.

The older presigned flow (POST /media: PUT the file to the returned upload_url, then complete) still works.

Manage the library

Files are deleted automatically when nothing needs them any more (expires_at tells when, null means never):

  • a file no post uses: 7 days after upload;
  • a file of published or canceled posts: the workspace's retention period after the last of them finished;
  • a file of a failed or partly published post: 30 days, so the post can be retried;
  • an upload that never finished: one day after it started.

Files marked keep, files of an idea and files of posts that have not finished are never deleted automatically. File urls are signed and valid for one hour: read them again instead of storing them.