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.
| Type | Formats | Largest file |
|---|---|---|
| Image | JPEG, PNG | 8 MB |
| Video | MP4, MOV | your plan's video limit (at most 2 GB) |
| Document | PDF (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)
- Start:
POST /media/uploadswithfile_name,mime_typeandsize_bytes. The answer gives themediaid,part_size(16 MB) andpart_count. - Send each part as raw bytes:
PUT /media/{id}/parts/{n}, numbered from 1. Every part is exactlypart_sizebytes except the last. Parts can be sent in any order and sent again. - Finish:
POST /media/{id}/complete. The parts are joined and the file is checked. A missing part gives409 conflictwithdetails.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.binFrom 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).
Upload links (no API key)
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
GET /media: newest first, filter withtype; page withbeforeset to the previousnext_cursor.PATCH /media/{id}: changealt_text(read by screen readers),original_name, orkeep.DELETE /media/{id}andPOST /media/bulk-delete: not while a scheduled post uses the file.GET /media/usage: storage used across all workspaces of the owner, and the plan's limit.
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.