Create a LinkedIn Post
POST /api/v1/create_post
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, andVIDEO. - Accepted values for comment scope:
ALL,CONNECTIONS_ONLY, andNONE. - 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.
Headers
| Name | Type | Required |
|---|---|---|
x-api-key | string | Yes |
x-api-secret | string | Yes |
Request Body
Schema
accountIdstringrequiredThe unique identifier of the WeLink account.
contentstringrequiredThe text content of the post.
post_settingsobjectrequiredConfiguration for post visibility and commenting.
attachmentsarrayArray of file attachments to include.
Sample Request
{
"accountId": "string",
"content": "string",
"post_settings": {
"post_type": "string",
"comment_scope": "string",
"company_id": "string",
"group_id": "string",
"is_private": false,
"document_title": "string",
"brand_partnership": false
},
"attachments": [
"string"
]
}
Responses
Webhook Events
Schema
statusstringStatus indicating the request completed successfully (e.g. "SUCCESS").
requestIdstringUnique identifier for the request.
resultobjectThe response payload.
postedbooleanWhether the post was created successfully.
post_urlstringURL of the created post.
post_urnstringLinkedIn URN of the created post.
Sample Response
{
"status": "string",
"requestId": "string",
"result": {
"posted": false,
"post_url": "string",
"post_urn": "string"
}
}