PublishQPublishQ

LinkedIn

Post text, photos, videos, and GIFs to LinkedIn profiles and company pages through the PublishQ API.

What you can post

TypeSupportedMax mediaNotes
Text only03,000 character limit
Photos / GIFs20JPEG, PNG, GIF. Max 20 MB each. GIFs are treated as images
Video1MP4 only. Max 5 GB, 3 seconds to 30 minutes

Limitations

  • Videos and images cannot be mixed. A post can have up to 20 images OR 1 video — not both.
  • Only MP4 video format is supported by the LinkedIn API.

Company Pages

You can post to personal profiles and company pages you administer. When you connect LinkedIn, PublishQ automatically adds any pages where you have admin or content admin access as separate accounts.

Quick start

Post text

curl -X POST https://publishq.com/api/v1/posts \
  -H "Authorization: Bearer pq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Excited to share this update with my network!",
    "accounts": [
      { "accountId": "your-linkedin-account-id" }
    ],
    "publishNow": true
  }'

Post a photo or video

Upload your media

curl -X POST https://publishq.com/api/v1/media \
  -H "Authorization: Bearer pq_live_..." \
  -F "[email protected]"
curl https://publishq.com/api/v1/media \
  -H "Authorization: Bearer pq_live_..."

Pick the id of the media you want to use from the response.

Create the post

curl -X POST https://publishq.com/api/v1/posts \
  -H "Authorization: Bearer pq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Check out our latest work 📸",
    "mediaIds": ["media-id-from-step-1"],
    "accounts": [
      { "accountId": "your-linkedin-account-id" }
    ],
    "publishNow": true
  }'

Post multiple photos

Upload each photo first (repeat step 1 for each file), then pass all media IDs in the post. Up to 20 images per post.

curl -X POST https://publishq.com/api/v1/posts \
  -H "Authorization: Bearer pq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Photo dump from the event 📷",
    "mediaIds": ["media-id-1", "media-id-2", "media-id-3"],
    "accounts": [
      { "accountId": "your-linkedin-account-id" }
    ],
    "publishNow": true
  }'

Post to a company page

Same as posting to a personal profile — just use the page's PublishQ account ID.

Find your page account ID (optional)

List your connected accounts to find the PublishQ ID for your company page:

curl https://publishq.com/api/v1/accounts \
  -H "Authorization: Bearer pq_live_..."

Look for the account with "platform": "LINKEDIN" that corresponds to your page. The id field is what you use as accountId.

Create the post

curl -X POST https://publishq.com/api/v1/posts \
  -H "Authorization: Bearer pq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Company update from our team 🚀",
    "accounts": [
      { "accountId": "your-linkedin-page-account-id" }
    ],
    "publishNow": true
  }'

Post with visibility setting

Restrict a post to your connections only instead of public.

curl -X POST https://publishq.com/api/v1/posts \
  -H "Authorization: Bearer pq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Just for my network 🤝",
    "accounts": [
      {
        "accountId": "your-linkedin-account-id",
        "platformSpecificSettings": {
          "visibility": "CONNECTIONS"
        }
      }
    ],
    "publishNow": true
  }'

Platform-specific settings

Pass these inside platformSpecificSettings on the LinkedIn account entry. All fields are optional — defaults to public visibility when omitted.

FieldTypeDescription
visibilityenum (optional)Who can see the post. PUBLIC (anyone on LinkedIn) or CONNECTIONS (only your connections). Defaults to PUBLIC. Only available for personal profiles — company pages are always public.
Full schema: LinkedInPlatformSpecificSettings

Media specs

Photos

SpecValue
FormatsJPEG, PNG, GIF
Max file size20 MB
Max per post20

Videos

SpecValue
FormatMP4
Max file size5 GB
Min file size75 KB
Duration3 seconds to 30 minutes

Not yet supported

  • Documents (PDF) — Swipeable PDF slide posts (coming soon)
  • Polls (coming soon)

On this page