Complete multipart video upload
Call after all video chunks have been PUT to the pre-signed URLs. Only needed for MULTIPART uploads (large videos).
/posts/upload/completeCode 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}]}'Call after all video chunks have been PUT to the pre-signed URLs. Only needed for MULTIPART uploads (large videos).
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, documents, 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. Documents (PDF): after PUTting the bytes, poll GET /posts/upload/document-status until ready before calling /posts/create.
Check document (PDF) processing status
After PUTting a document to the pre-signed URL from /posts/upload/init, poll this until status is READY. LinkedIn rasterizes each page into preview images first; the document cannot be posted until it is READY. Only needed for mediaType=document.
