Nimply Developers
Examples

Post to LinkedIn

Publish a text, image, or video post to LinkedIn with visibility control.

Scopes: channels:read, posts:write, posts:publish (plus media:write if you attach media).

LinkedIn posts go through the dedicated POST /v1/posts/linkedin endpoint, which adds one platform option on top of the generic post flow: visibility.

1. Find your LinkedIn channel

curl https://api.nimply.io/v1/channels \
  -H "Authorization: Bearer $NIMPLY_API_KEY"
[
  {
    "id": "323e4567-e89b-12d3-a456-426614174002",
    "name": "Acme Corp",
    "type": "LINKEDIN_PROFILE",
    "isConnected": true,
    "tokenStatus": "HEALTHY"
  }
]

Use any channel whose type starts with LINKEDIN; the endpoint accepts them all. Any other channel type returns 400.

2. Create the post

curl -X POST https://api.nimply.io/v1/posts/linkedin \
  -H "Authorization: Bearer $NIMPLY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: li-product-update-001" \
  -d '{
    "channelId": "323e4567-e89b-12d3-a456-426614174002",
    "content": "We just shipped scheduled carousels. Here is what changed and why it took three rewrites.",
    "mediaIds": ["c4d5e6f7-1a2b-4c3d-9e8f-0a1b2c3d4e5f"],
    "visibility": "PUBLIC",
    "schedule": "next_slot"
  }'
{
  "id": "9b356e57-…",
  "channelId": "323e4567-e89b-12d3-a456-426614174002",
  "contentType": "POST",
  "status": "SCHEDULED",
  "scheduledAt": "2026-07-23T09:00:00.000Z",
  "mediaIds": ["c4d5e6f7-1a2b-4c3d-9e8f-0a1b2c3d4e5f"]
}

Gotchas

  • content is capped at 3000 characters — LinkedIn's own post limit. The API rejects longer text at request time.
  • Up to 20 images or 1 video per post; media must be uploaded first via POST /v1/media. Text-only posts are fine — just omit mediaIds.
  • visibility defaults to PUBLIC. CONNECTIONS restricts the post to the account's 1st-degree connections and only applies to personal accounts.
  • schedule works like createPost (next_slot, an ISO timestamp, or omit to create a draft), and an Idempotency-Key header makes retries safe.

On this page