This API allows authenticated users to create a post on LinkedIn with customizable settings and attachments.
The post can be customized by selecting a type, and you can also define who can comment on the post. Attachments can be added by referencing file IDs from previously uploaded files. The post can either be private or visible to a wider audience.
Notes
- Accepted values for post type:
TEXT, IMAGE, DOCUMENT, and VIDEO. - Accepted values for comment scope:
ALL, CONNECTIONS_ONLY, and NONE. - You cannot specify both company ID and group ID in the same request; you must select one or the other.
- Only one post type can be selected (text, image, document, or video).
- Comment scope determines who can comment on the post: all users, connections only, or no one.
- Attachments must use file IDs retrieved from previous file uploads.
- You can choose whether the post is private or public using the is_private field.
This API enables the creation of posts with various configurations, giving flexibility in how content is shared and who can interact with it.
| Header Parameters |
|---|
x-api-key uuid — REQUIRED |
x-api-secret uuid — REQUIRED |
| Request Body — REQUIRED |
|---|
accountId string — REQUIRED |
content string — REQUIRED |
post_settings object — REQUIREDpost_type string — REQUIRED | comment_scope string — REQUIRED | company_id string | group_id string | is_private boolean — REQUIRED | document_title string — REQUIRED | brand_partnership boolean — REQUIRED |
|
attachments string[] |
| Responses |
|---|
| Schema — OPTIONAL |
|---|
status string | request_id string | result objectposted boolean | post_url string | post_urn string |
|
|
| Schema — OPTIONAL |
|---|
status string | request_id string | error string |
|