Create Post
curl --request POST \
--url https://api.linkupapi.com/v1/posts/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"message": "<string>",
"login_token": "<string>",
"country": "<string>",
"file": "<string>",
"files": [
{}
]
}
'import requests
url = "https://api.linkupapi.com/v1/posts/create"
payload = {
"message": "<string>",
"login_token": "<string>",
"country": "<string>",
"file": "<string>",
"files": [{}]
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: '<string>',
login_token: '<string>',
country: '<string>',
file: '<string>',
files: [{}]
})
};
fetch('https://api.linkupapi.com/v1/posts/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linkupapi.com/v1/posts/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>',
'login_token' => '<string>',
'country' => '<string>',
'file' => '<string>',
'files' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.linkupapi.com/v1/posts/create"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"login_token\": \"<string>\",\n \"country\": \"<string>\",\n \"file\": \"<string>\",\n \"files\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.linkupapi.com/v1/posts/create")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"login_token\": \"<string>\",\n \"country\": \"<string>\",\n \"file\": \"<string>\",\n \"files\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v1/posts/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"login_token\": \"<string>\",\n \"country\": \"<string>\",\n \"file\": \"<string>\",\n \"files\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Post created successfully"
}
Content & Posts
Create Post
Create a new LinkedIn post with optional image attachment
POST
/
v1
/
posts
/
create
Create Post
curl --request POST \
--url https://api.linkupapi.com/v1/posts/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"message": "<string>",
"login_token": "<string>",
"country": "<string>",
"file": "<string>",
"files": [
{}
]
}
'import requests
url = "https://api.linkupapi.com/v1/posts/create"
payload = {
"message": "<string>",
"login_token": "<string>",
"country": "<string>",
"file": "<string>",
"files": [{}]
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: '<string>',
login_token: '<string>',
country: '<string>',
file: '<string>',
files: [{}]
})
};
fetch('https://api.linkupapi.com/v1/posts/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linkupapi.com/v1/posts/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>',
'login_token' => '<string>',
'country' => '<string>',
'file' => '<string>',
'files' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.linkupapi.com/v1/posts/create"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"login_token\": \"<string>\",\n \"country\": \"<string>\",\n \"file\": \"<string>\",\n \"files\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.linkupapi.com/v1/posts/create")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"login_token\": \"<string>\",\n \"country\": \"<string>\",\n \"file\": \"<string>\",\n \"files\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v1/posts/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"login_token\": \"<string>\",\n \"country\": \"<string>\",\n \"file\": \"<string>\",\n \"files\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Post created successfully"
}
Create a new post on LinkedIn with text content and an optional image attachment.
This endpoint costs 1 credit per request. Ignore this if you’re on per-seat pricing: usage is unlimited.
Header Parameters
string
required
Your API key
Body Parameters
string
required
Text content of the post
string
required
LinkedIn authentication cookie obtained from the login/verify process
string
default:"FR"
Country code for proxy selection. Available: US, CA, MX, CR, BR, AR, CL, CO, FR, UK, DE, NL, ES, IT, PT, BE, CH, AT, IE, SE, DK, FI, LT, LV, EE, PL, CZ, SK, HU, RO, UA, SI, HR, RS, AL, GR, CY, TR, IL, AE, EG, ZA, IN, PK, BD, JP, SG, MY, ID, TH, PH, AU
string
Optional image file URL. Direct link to the image file you want to attach to the post.
array
Optional multiple image file URLs for creating carousel posts. Array of direct links to image files.
Response
string
Request status (success/error)
string
Detailed status message about the post creation
{
"status": "success",
"message": "Post created successfully"
}
Notes
Post Settings
- Default post visibility is set to “ANYONE” (public)
- Comments are enabled for all users by default
Image Requirements
- Image must be provided as a direct URL to the file
- Supported formats:
- PNG
- JPEG/JPG
- Other LinkedIn-supported image formats
- Image restrictions:
- Must comply with LinkedIn’s maximum file size limits
- Should meet LinkedIn’s dimension requirements
Features
- Text content with no formatting
- Single image attachment support via URL
- Multiple images support for carousel posts
- Comments enabled by default
Automatic Handling
- Image download and upload process
- Post metadata creation
- Visibility and sharing options configuration
Limitations & Guidelines
- Subject to LinkedIn’s posting frequency limits
- Must comply with LinkedIn’s content policies
- Media upload size and format restrictions apply
Was this page helpful?