APILinkedIn Posts
Complete multipart video upload
Call after all video chunks have been PUT to the pre-signed URLs. Only needed for MULTIPART uploads (large videos).
POST
/posts/upload/completeAuthentication requiredPosts
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/posts/upload/complete' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"mediaArtifactUrn":"urn:li:example:123456","partUploadResponses":[{"httpStatusCode":0,"headers":null}]}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | |
mediaArtifactUrn | string | Yes | From /upload/init response. |
multipartMetadata | string | No | From /upload/init response. |
partUploadResponses | array | Yes |
Example
{
"mediaArtifactUrn": "urn:li:example:123456",
"partUploadResponses": [
{
"httpStatusCode": 0,
"headers": null
}
]
}Responses
| Status | Description |
|---|---|
| 200 | Upload finalized |
| 401 | Unauthorized |
| 500 | Server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean |
200 Example
{
"success": true
}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"
}Initialize media upload — get pre-signed URL(s)
Returns pre-signed URL(s) from LinkedIn for direct client upload. For images and small videos: returns a single uploadUrl. For large videos: returns partUploadRequests (4MB chunks). The API never touches media bytes — the client uploads directly to LinkedIn.
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.
