Provider settings

LinkedIn Settings

API settings for posting to LinkedIn

Settings Schema

When creating a post for LinkedIn (profile or page), use the following settings schema:

{
  "settings": {
    "__type": "linkedin",
    "post_as_images_carousel": false
  }
}

Note

Use __type: "linkedin" for personal profiles and __type: "linkedin-page" for company pages. Both use the same settings schema.

Fields

FieldTypeRequiredDescription
__typestringYeslinkedin or linkedin-page
post_as_images_carouselbooleanNoDisplay multiple images as a carousel
carousel_namestringNoName for the carousel document

post_as_images_carousel

When set to true and you have multiple images, they will be displayed as a swipeable carousel instead of a collage.

ValueDescription
trueImages displayed as carousel
falseImages displayed as collage (default)

Optional name for the carousel document. Only used when post_as_images_carousel is true.


Mentioning a Company Page

To tag a company page, look up its id with the trigger endpoint and the mention tool, passing the page's vanity name (the part after linkedin.com/company/):

curl -X POST https://tryferra.co/api/public/v1/integration-trigger/{integrationId} \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"methodName": "mention", "data": {"query": "microsoft"}}'

The response contains { output: [{ id, label, image }] }, or an empty array when no page has that exact vanity name. Put the result in the post content as a span:

<p>Built with <span data-mention-id="{id}" data-mention-label="{label}">@{label}</span></p>

The mention renders as a link to the company page once the post is published.

Note

Only company pages can be looked up, by their exact vanity name. LinkedIn restricts member search to approved partners, so people can't be tagged this way.


Complete Example

Text Post

{
  "type": "schedule",
  "date": "2024-12-14T10:00:00.000Z",
  "shortLink": false,
  "tags": [],
  "posts": [
    {
      "integration": {
        "id": "your-linkedin-integration-id"
      },
      "value": [
        {
          "content": "Excited to share our latest update! 🎉\n\n#innovation #tech",
          "image": []
        }
      ],
      "settings": {
        "__type": "linkedin"
      }
    }
  ]
}

Carousel Post

{
  "type": "schedule",
  "date": "2024-12-14T10:00:00.000Z",
  "shortLink": false,
  "tags": [],
  "posts": [
    {
      "integration": {
        "id": "your-linkedin-integration-id"
      },
      "value": [
        {
          "content": "Check out our product showcase! Swipe through to see all features →",
          "image": [
            {
              "id": "image-1-id",
              "path": "https://tryferra.co/uploads/image1.png"
            },
            {
              "id": "image-2-id",
              "path": "https://tryferra.co/uploads/image2.png"
            },
            {
              "id": "image-3-id",
              "path": "https://tryferra.co/uploads/image3.png"
            }
          ]
        }
      ],
      "settings": {
        "__type": "linkedin",
        "post_as_images_carousel": true,
        "carousel_name": "Product Showcase"
      }
    }
  ]
}

Company Page Post

{
  "type": "now",
  "date": "2024-12-14T10:00:00.000Z",
  "shortLink": false,
  "tags": [],
  "posts": [
    {
      "integration": {
        "id": "your-linkedin-page-integration-id"
      },
      "value": [
        {
          "content": "We're hiring! Join our team and help us build the future.",
          "image": []
        }
      ],
      "settings": {
        "__type": "linkedin-page",
        "post_as_images_carousel": false
      }
    }
  ]
}

Parts of these docs are adapted from open-source documentation under the MIT License (© 2023 Mintlify).