# LinkedIn (/docs/platforms/linkedin)




What you can post [#what-you-can-post]

| Type          | Supported | Max media | Notes                                                      |
| ------------- | --------- | --------- | ---------------------------------------------------------- |
| Text only     | ✅         | 0         | 3,000 character limit                                      |
| Photos / GIFs | ✅         | 20        | JPEG, PNG, GIF. Max 20 MB each. GIFs are treated as images |
| Video         | ✅         | 1         | MP4 only. Max 5 GB, 3 seconds to 30 minutes                |

<Callout title="Limitations" type="warn">
  * **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.
</Callout>

<Callout title="Company Pages" type="info">
  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.
</Callout>

Quick start [#quick-start]

Post text [#post-text]

<Tabs items="['cURL']">
  <Tab value="cURL">
    ```bash
    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
      }'
    ```
  </Tab>
</Tabs>

Post a photo or video [#post-a-photo-or-video]

<div className="fd-steps">
  <div className="fd-step">
    Upload your media [#1-upload-your-media]

    <Tabs items="['Upload new media', 'Use existing media']">
      <Tab value="Upload new media">
        ```bash
        curl -X POST https://publishq.com/api/v1/media \
          -H "Authorization: Bearer pq_live_..." \
          -F "file=@photo.jpg"
        ```
      </Tab>

      <Tab value="Use existing media">
        ```bash
        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.
      </Tab>
    </Tabs>
  </div>

  <div className="fd-step">
    Create the post [#2-create-the-post]

    <Tabs items="['cURL']">
      <Tab value="cURL">
        ```bash
        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
          }'
        ```
      </Tab>
    </Tabs>
  </div>
</div>

Post multiple photos [#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.

<Tabs items="['cURL']">
  <Tab value="cURL">
    ```bash
    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
      }'
    ```
  </Tab>
</Tabs>

Post to a company page [#post-to-a-company-page]

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

<div className="fd-steps">
  <div className="fd-step">
    Find your page account ID (optional) [#1-find-your-page-account-id-optional]

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

    ```bash
    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`.
  </div>

  <div className="fd-step">
    Create the post [#2-create-the-post-1]

    <Tabs items="['cURL']">
      <Tab value="cURL">
        ```bash
        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
          }'
        ```
      </Tab>
    </Tabs>
  </div>
</div>

Post with visibility setting [#post-with-visibility-setting]

Restrict a post to your connections only instead of public.

<Tabs items="['cURL']">
  <Tab value="cURL">
    ```bash
    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
      }'
    ```
  </Tab>
</Tabs>

Platform-specific settings [#platform-specific-settings]

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

<PlatformSettingsTable platform="LINKEDIN" />

<small>
  Full schema: 

  [LinkedInPlatformSpecificSettings](/docs-scalar#model/LinkedInPlatformSpecificSettings)
</small>

Media specs [#media-specs]

Photos [#photos]

| Spec          | Value          |
| ------------- | -------------- |
| Formats       | JPEG, PNG, GIF |
| Max file size | 20 MB          |
| Max per post  | 20             |

Videos [#videos]

| Spec          | Value                   |
| ------------- | ----------------------- |
| Format        | MP4                     |
| Max file size | 5 GB                    |
| Min file size | 75 KB                   |
| Duration      | 3 seconds to 30 minutes |

Not yet supported [#not-yet-supported]

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