Skip to content

socifyr media ​

socifyr media manages the workspace media library. Upload a file once, then reuse its ID in any post with --media-id.

bash
socifyr media list [--type <type>] [--search <query>] [--limit <n>] [--json]
socifyr media upload <file> [--alt <text>] [--json]
socifyr media get <id> [--json]
socifyr media delete <ids...> [--json]

See media library concepts for supported types and size limits.

How do I list and search my media library? ​

FlagDescriptionDefault
--type <type>Filter by image, video or documentall
--search <query>Search by filenamenone
--limit <n>Maximum results20
--jsonPrint the API response as JSONoff
bash
socifyr media list --type image --search banner --limit 10
Media library (2 total)

  banner.png
      ID: 6a04f715d3d7d93575e65d13   Size: 330.6KB   image
  banner-dark.png
      ID: 6a04f715d3d7d93575e65d14   Size: 256.6KB   image
      Alt: Dark product banner

Each row has a type icon in a real terminal. With no matches the CLI prints No media found.

How do I upload a file to the media library? ​

bash
socifyr media upload banner.png --alt "Product banner"
# ✓ Uploaded
#   ID:   6a05031284584482ace13d3b
#   File: banner.png
#   Size: 330.6KB
#   URL:  https://...
FlagDescription
--alt <text>Alt text. Saved with a second call after the upload
--jsonPrint the uploaded item as JSON

The file is read into memory and uploaded under its original filename. A missing file prints File not found: <path> and exits with 1.

How do I reuse an uploaded file in a post? ​

bash
socifyr post "Same asset, new caption" --media-id 6a05031284584482ace13d3b --to linkedin-myhandle

You can pass several IDs separated by commas. See socifyr post.

How do I get details for one media item? ​

bash
socifyr media get 6a05031284584482ace13d3b
  banner.png
  ID:       6a05031284584482ace13d3b
  Type:     image
  Size:     330.6KB
  URL:      https://...
  Alt:      Product banner

Desc and Tags lines appear when the item has them.

How do I delete media from the CLI? ​

bash
socifyr media delete 6a05031284584482ace13d3b
socifyr media delete 6a05031284584482ace13d3b 6a05031284584482ace13d3c
# ✓ Deleted 2 items

One ID calls the single delete endpoint; several IDs call the bulk delete endpoint. With --json the output is {"deleted":["<id>", ...]}.

API keys with guardrails

A key with a daily post limit, X spend cap or approval requirement can upload, list and get media but cannot delete it. The delete route is not on the guarded-key allowlist.

Next steps ​