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:
json
{
"settings": {
"__type": "linkedin",
"post_as_images_carousel": false
}
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
__type | string | Yes | linkedin or linkedin-page |
post_as_images_carousel | boolean | No | Display multiple images as a carousel |
carousel_name | string | No | Name 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.
| Value | Description |
|---|---|
true | Images displayed as carousel |
false | Images displayed as collage (default) |
carousel_name
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/):
bash
curl -X POST https://api.infipost.asia/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:
html
<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.
Complete Example
Text Post
json
{
"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
json
{
"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://uploads.postiz.com/image1.png"
},
{
"id": "image-2-id",
"path": "https://uploads.postiz.com/image2.png"
},
{
"id": "image-3-id",
"path": "https://uploads.postiz.com/image3.png"
}
]
}
],
"settings": {
"__type": "linkedin",
"post_as_images_carousel": true,
"carousel_name": "Product Showcase"
}
}
]
}
Company Page Post
json
{
"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
}
}
]
}
Bài viết này có hữu ích không?