Skip to content

How to publish an image or carousel post ​

Call POST /api/content/photos with connection slugs and medias, a list of media library IDs or public image URLs. In the TypeScript SDK and the CLI you can also pass local files, which are uploaded to your media library first.

Platforms differ on image size, count and format. The numbers are in platform constraints. The smallest carousel limit across your selected accounts applies to the whole post.

How do I publish images? ​

text
1. Sidebar > New Post.
2. Choose the photo content type and drop in your images, or pick them
   from the Media Library.
3. Select accounts, write the caption, adjust per-platform options if needed.
4. Click Publish.
bash
# Local files: auto-detected as images, uploaded, then posted
socifyr post "Launch day" --media banner.jpg,detail.jpg --to instagram-mybrand,linkedin-myhandle --wait

# Reuse a library asset or a public URL without uploading again
socifyr post "Launch day" --media-id 6a04f715d3d7d93575e65d13 --to instagram-mybrand
socifyr post "Launch day" --media-id https://example.com/banner.jpg --to linkedin-myhandle
typescript
import { readFileSync } from 'node:fs'

const upload = await socifyr.uploads.photos({
  connections: ['instagram-mybrand', 'linkedin-myhandle'],
  medias: [readFileSync('banner.jpg'), readFileSync('detail.jpg')],
  text: 'Launch day',
  contentFormat: 'photo_carousel',
})
python
# The Python SDK takes media library IDs or public URLs, not raw files.
res = client.uploads.photos(
    connections=["instagram-mybrand", "linkedin-myhandle"],
    medias=["6a04f715d3d7d93575e65d13", "https://example.com/detail.jpg"],
    text="Launch day",
)
print(res["requestId"])
bash
curl -X POST https://api.socifyr.com/api/content/photos \
  -H "Authorization: Bearer $SOCIFYR_API_KEY" \
  -H "X-Workspace-Id: $SOCIFYR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "connections": ["instagram-mybrand", "linkedin-myhandle"],
    "medias": ["6a04f715d3d7d93575e65d13", "https://example.com/detail.jpg"],
    "text": "Launch day",
    "contentFormat": "photo_carousel"
  }'
json
{
  "tool": "post_image",
  "arguments": {
    "connections": ["instagram-mybrand", "linkedin-myhandle"],
    "images": ["6a04f715d3d7d93575e65d13", "https://example.com/detail.jpg"],
    "text": "Launch day",
    "contentFormat": "photo_carousel"
  }
}

Prompt for your agent: "Post the first two images in my media library to Instagram as a carousel with the caption 'Launch day'." The agent calls list_media, then post_image with the IDs.

What are the accepted media inputs? ​

InputREST medias[]TypeScript SDKCLIMCP images
Media library ID (24-character hex)yesyes--media-idyes
Public image URLyesyes--media-idyes
Local filemultipart uploadBuffer or Blob--mediano

MCP accepts up to 10 images per call. contentFormat accepts photo_single, photo_carousel or story on the MCP tool.

What does the response look like? ​

json
{
  "success": true,
  "data": {
    "success": true,
    "requestId": "0e2c8b1a-2d67-4f0b-8a41-9d7f3a1c55e2",
    "usage": { "count": 5, "limit": 30, "remaining": 25 },
    "uploadId": "6a05032a84584482ace13d5f"
  }
}

What errors can I get, and how do I fix them? ​

ErrorFix
Media not found: <id> (400)The ID is not in this workspace's library. Run socifyr media list.
All media must be of type "photo" (400)You mixed a video into a photo post. Use the video guide.
Platforms do not support photo: ... (400)One of the selected accounts cannot take images. Remove it; the message names the platforms.
Storage limit reached for your plan... (403)Delete unused media or upgrade. See limits.
Channel error mentioning aspect ratio or file sizeResize to the platform limits in platform constraints, then retry.

FAQ ​

Can I set different captions per platform? ​

Yes. Use platformOptions keyed by slug. See Cross-posting.

Can I post an Instagram story? ​

story is a valid contentFormat on photo posts. Check Content formats and Instagram for how each platform treats it.

Next steps ​