APILinkedIn Posts
Create a LinkedIn post
Creates a LinkedIn post. For text-only, omit mediaType. For media posts, first use /posts/upload/init to upload, then pass the assetUrn here.
POST
/posts/createAuthentication requiredPosts
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/posts/create' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"text":"Try ConnectSafely.AI Today"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | |
text | string | Yes | |
visibility | string | No | |
mediaType | string | No | |
assetUrn | string | No | From /posts/upload/init. Required for image/video. |
recipes | array | No | From /posts/upload/init (video). |
altText | string | No | Alt text (images). |
Example
{
"text": "Try ConnectSafely.AI Today"
}Responses
| Status | Description |
|---|---|
| 200 | Post created |
| 400 | Bad request |
| 401 | Unauthorized |
| 500 | Server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
postUrn | string | |
shareUrn | string | |
accountId | string |
200 Example
{
"success": true,
"postUrn": "urn:li:share:7012345678901234567",
"shareUrn": "urn:li:example:123456",
"accountId": "acc_12345"
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
400 Example
{
"error": "example_value"
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "example_value"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "example_value"
}Complete multipart video upload
Call after all video chunks have been PUT to the pre-signed URLs. Only needed for MULTIPART uploads (large videos).
LinkedIn Profiles API
Retrieve enriched LinkedIn profile data via API. Get work history, skills, education, and contact information for lead enrichment and CRM sync.
