curl --request POST \
--url https://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"linkedin_account_sid": "<string>",
"title": "<string>",
"content_html": "<string>",
"scheduled_at": "<string>",
"commentary": "<string>",
"author_organization_id": "<string>",
"newsletter_id": "<string>",
"cover_image": {
"file_base64": "<string>",
"url": "<string>",
"file_byte_size": 2,
"file_name": "<string>",
"file_type": "<string>",
"caption": "<string>"
},
"client_reference": "<string>",
"confirmed_not_sent": "<string>",
"confirmed_sent": "<string>"
}
'import requests
url = "https://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article"
payload = {
"linkedin_account_sid": "<string>",
"title": "<string>",
"content_html": "<string>",
"scheduled_at": "<string>",
"commentary": "<string>",
"author_organization_id": "<string>",
"newsletter_id": "<string>",
"cover_image": {
"file_base64": "<string>",
"url": "<string>",
"file_byte_size": 2,
"file_name": "<string>",
"file_type": "<string>",
"caption": "<string>"
},
"client_reference": "<string>",
"confirmed_not_sent": "<string>",
"confirmed_sent": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
linkedin_account_sid: '<string>',
title: '<string>',
content_html: '<string>',
scheduled_at: '<string>',
commentary: '<string>',
author_organization_id: '<string>',
newsletter_id: '<string>',
cover_image: {
file_base64: '<string>',
url: '<string>',
file_byte_size: 2,
file_name: '<string>',
file_type: '<string>',
caption: '<string>'
},
client_reference: '<string>',
confirmed_not_sent: '<string>',
confirmed_sent: '<string>'
})
};
fetch('https://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article', 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://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article",
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([
'linkedin_account_sid' => '<string>',
'title' => '<string>',
'content_html' => '<string>',
'scheduled_at' => '<string>',
'commentary' => '<string>',
'author_organization_id' => '<string>',
'newsletter_id' => '<string>',
'cover_image' => [
'file_base64' => '<string>',
'url' => '<string>',
'file_byte_size' => 2,
'file_name' => '<string>',
'file_type' => '<string>',
'caption' => '<string>'
],
'client_reference' => '<string>',
'confirmed_not_sent' => '<string>',
'confirmed_sent' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <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://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article"
payload := strings.NewReader("{\n \"linkedin_account_sid\": \"<string>\",\n \"title\": \"<string>\",\n \"content_html\": \"<string>\",\n \"scheduled_at\": \"<string>\",\n \"commentary\": \"<string>\",\n \"author_organization_id\": \"<string>\",\n \"newsletter_id\": \"<string>\",\n \"cover_image\": {\n \"file_base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file_byte_size\": 2,\n \"file_name\": \"<string>\",\n \"file_type\": \"<string>\",\n \"caption\": \"<string>\"\n },\n \"client_reference\": \"<string>\",\n \"confirmed_not_sent\": \"<string>\",\n \"confirmed_sent\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<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://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"linkedin_account_sid\": \"<string>\",\n \"title\": \"<string>\",\n \"content_html\": \"<string>\",\n \"scheduled_at\": \"<string>\",\n \"commentary\": \"<string>\",\n \"author_organization_id\": \"<string>\",\n \"newsletter_id\": \"<string>\",\n \"cover_image\": {\n \"file_base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file_byte_size\": 2,\n \"file_name\": \"<string>\",\n \"file_type\": \"<string>\",\n \"caption\": \"<string>\"\n },\n \"client_reference\": \"<string>\",\n \"confirmed_not_sent\": \"<string>\",\n \"confirmed_sent\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"linkedin_account_sid\": \"<string>\",\n \"title\": \"<string>\",\n \"content_html\": \"<string>\",\n \"scheduled_at\": \"<string>\",\n \"commentary\": \"<string>\",\n \"author_organization_id\": \"<string>\",\n \"newsletter_id\": \"<string>\",\n \"cover_image\": {\n \"file_base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file_byte_size\": 2,\n \"file_name\": \"<string>\",\n \"file_type\": \"<string>\",\n \"caption\": \"<string>\"\n },\n \"client_reference\": \"<string>\",\n \"confirmed_not_sent\": \"<string>\",\n \"confirmed_sent\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "action",
"action": "<string>",
"item": "<unknown>",
"result": {
"article": {
"article_id": "<string>",
"article_urn": "<string>",
"linkedin_article_urn": "<string>",
"title": "<string>",
"state": "<string>",
"content_html": "<string>",
"url": "<string>",
"cover_image_url": "<string>",
"cover_image_caption": "<string>",
"author_profile_id": "<string>",
"author_organization_id": "<string>",
"newsletter_id": "<string>",
"post_urn": "<string>",
"activity_urn": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"published_at": "<string>",
"scheduled_at": "<string>",
"version": 123
},
"post": {
"activity_urn": "<string>",
"post_urn": "<string>",
"url": "<string>",
"created_at": "<string>",
"text": "<string>",
"lifecycle_state": "<string>"
},
"activity_log": {},
"idempotent_replay": true,
"content_differs": true
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
},
"pacing": {
"linkedin_account_sid": "<string>",
"limit_type": "<string>",
"next_call_after": "<string>",
"remaining_today": 1
}
}Create LinkedIn article
Create ONE LinkedIn article (LinkedIn’s long-form post) as the member or AS a company page it administers (author_organization_id), as a newsletter issue (newsletter_id; excludes visibility), with a cover_image; wire create-article. state decides: DRAFT creates and stops (nothing public, no key); SCHEDULED also schedules its share (scheduled_at REQUIRED, ISO 8601 with timezone, in the future); PUBLISHED shares now. content_html is the HTML subset the field describes; any other tag is a 422 naming it. Spends the posting bucket (20/day in series of 3 at a 1200 s pause; free plan 4). Answers the article read back and its post (a scheduled share has post_urn only). Sends once per client_reference and place (your feed or the page; a new scheduled_at is the same share): a repeat is answered, never sent twice; on a 409 read error.context.send_outcome, never resend under a new key. 409 article_not_published is send_outcome unknown: repeat after retry_after; context.article_id names a draft left behind.
Contract:
- MCP tool
create_linkedin_article, registry packagemcp.linkedin/linkedin_posting, mountlinkedin.content. - Operation
action, response envelopeaction. - Flags: dangerous: the MCP layer gates it behind a preview/commit token, and the effect cannot be undone through this API; paced: a call spends the
postingsmart-limit bucket of the account it runs on, and calls of one bucket are spaced per account. A short wait is slept by the server; a longer one answers 429rate_limitedwithcontext.retry_after, and the same call succeeds from that moment. Parallel calls on one account queue behind each other.
curl --request POST \
--url https://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"linkedin_account_sid": "<string>",
"title": "<string>",
"content_html": "<string>",
"scheduled_at": "<string>",
"commentary": "<string>",
"author_organization_id": "<string>",
"newsletter_id": "<string>",
"cover_image": {
"file_base64": "<string>",
"url": "<string>",
"file_byte_size": 2,
"file_name": "<string>",
"file_type": "<string>",
"caption": "<string>"
},
"client_reference": "<string>",
"confirmed_not_sent": "<string>",
"confirmed_sent": "<string>"
}
'import requests
url = "https://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article"
payload = {
"linkedin_account_sid": "<string>",
"title": "<string>",
"content_html": "<string>",
"scheduled_at": "<string>",
"commentary": "<string>",
"author_organization_id": "<string>",
"newsletter_id": "<string>",
"cover_image": {
"file_base64": "<string>",
"url": "<string>",
"file_byte_size": 2,
"file_name": "<string>",
"file_type": "<string>",
"caption": "<string>"
},
"client_reference": "<string>",
"confirmed_not_sent": "<string>",
"confirmed_sent": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
linkedin_account_sid: '<string>',
title: '<string>',
content_html: '<string>',
scheduled_at: '<string>',
commentary: '<string>',
author_organization_id: '<string>',
newsletter_id: '<string>',
cover_image: {
file_base64: '<string>',
url: '<string>',
file_byte_size: 2,
file_name: '<string>',
file_type: '<string>',
caption: '<string>'
},
client_reference: '<string>',
confirmed_not_sent: '<string>',
confirmed_sent: '<string>'
})
};
fetch('https://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article', 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://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article",
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([
'linkedin_account_sid' => '<string>',
'title' => '<string>',
'content_html' => '<string>',
'scheduled_at' => '<string>',
'commentary' => '<string>',
'author_organization_id' => '<string>',
'newsletter_id' => '<string>',
'cover_image' => [
'file_base64' => '<string>',
'url' => '<string>',
'file_byte_size' => 2,
'file_name' => '<string>',
'file_type' => '<string>',
'caption' => '<string>'
],
'client_reference' => '<string>',
'confirmed_not_sent' => '<string>',
'confirmed_sent' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <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://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article"
payload := strings.NewReader("{\n \"linkedin_account_sid\": \"<string>\",\n \"title\": \"<string>\",\n \"content_html\": \"<string>\",\n \"scheduled_at\": \"<string>\",\n \"commentary\": \"<string>\",\n \"author_organization_id\": \"<string>\",\n \"newsletter_id\": \"<string>\",\n \"cover_image\": {\n \"file_base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file_byte_size\": 2,\n \"file_name\": \"<string>\",\n \"file_type\": \"<string>\",\n \"caption\": \"<string>\"\n },\n \"client_reference\": \"<string>\",\n \"confirmed_not_sent\": \"<string>\",\n \"confirmed_sent\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<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://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"linkedin_account_sid\": \"<string>\",\n \"title\": \"<string>\",\n \"content_html\": \"<string>\",\n \"scheduled_at\": \"<string>\",\n \"commentary\": \"<string>\",\n \"author_organization_id\": \"<string>\",\n \"newsletter_id\": \"<string>\",\n \"cover_image\": {\n \"file_base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file_byte_size\": 2,\n \"file_name\": \"<string>\",\n \"file_type\": \"<string>\",\n \"caption\": \"<string>\"\n },\n \"client_reference\": \"<string>\",\n \"confirmed_not_sent\": \"<string>\",\n \"confirmed_sent\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/linkedin/v4/api/linkedin-posting/create-article")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"linkedin_account_sid\": \"<string>\",\n \"title\": \"<string>\",\n \"content_html\": \"<string>\",\n \"scheduled_at\": \"<string>\",\n \"commentary\": \"<string>\",\n \"author_organization_id\": \"<string>\",\n \"newsletter_id\": \"<string>\",\n \"cover_image\": {\n \"file_base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file_byte_size\": 2,\n \"file_name\": \"<string>\",\n \"file_type\": \"<string>\",\n \"caption\": \"<string>\"\n },\n \"client_reference\": \"<string>\",\n \"confirmed_not_sent\": \"<string>\",\n \"confirmed_sent\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "action",
"action": "<string>",
"item": "<unknown>",
"result": {
"article": {
"article_id": "<string>",
"article_urn": "<string>",
"linkedin_article_urn": "<string>",
"title": "<string>",
"state": "<string>",
"content_html": "<string>",
"url": "<string>",
"cover_image_url": "<string>",
"cover_image_caption": "<string>",
"author_profile_id": "<string>",
"author_organization_id": "<string>",
"newsletter_id": "<string>",
"post_urn": "<string>",
"activity_urn": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"published_at": "<string>",
"scheduled_at": "<string>",
"version": 123
},
"post": {
"activity_urn": "<string>",
"post_urn": "<string>",
"url": "<string>",
"created_at": "<string>",
"text": "<string>",
"lifecycle_state": "<string>"
},
"activity_log": {},
"idempotent_replay": true,
"content_differs": true
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
},
"pacing": {
"linkedin_account_sid": "<string>",
"limit_type": "<string>",
"next_call_after": "<string>",
"remaining_today": 1
}
}Authorizations
Body
Request body of create_linkedin_article.
The body as HTML, always present; "" is legal for a DRAFT (an empty article). The subset: p, h1-h6 (LinkedIn has one heading level), blockquote, pre or pre>code, ul/ol>li, hr, img (a data: URL, or an https url we download) alone or in a figure with a figcaption, iframe[src] embeds LinkedIn can ingest (YouTube and the like), br, and inline strong/b, em/i, a[href]; u, s, code, span and unknown inline tags are unwrapped. table, video, audio, script, style or any other block tag is a 422 naming the tag. Pictures (the cover included) share one 35 MB decoded budget; the html itself is capped at 1,000,000 characters without them.
With state SCHEDULED only (REQUIRED there, refused with DRAFT or PUBLISHED): ISO 8601 with timezone, in the future (a strictly past time is a 422; within a minute of now is passed through for LinkedIn to judge). The share lives in LinkedIn's own queue (get_linkedin_scheduled_posts); the article is listed by get_linkedin_articles with state SCHEDULED. The slot is no part of a key: a retry under the same client_reference with a new scheduled_at is the same share.
Write AS a company page the account administers: its numeric id in any spelling (the digits, a company urn, a /company// link), or its page link or slug when a company read of your workspace already knows the id (else 422 company_not_readable). get_linkedin_administered_companies lists the pages this account may write as, with their ids. The article and its share both go as the page. Omit to write as the member (the backend supplies the member's own id; no profile_id field exists here).
2048Make the article an issue of this newsletter: the digits of urn:li:fsd_contentSeries: (rows[].newsletter_id of get_linkedin_newsletters) or that urn. The owner must match author_organization_id (a page's newsletter needs the page). Excludes visibility.
^(?:urn:li:fsd_contentSeries:)?\d{1,20}$Your key for this ONE article share (max 255, byte for byte): one key per article share, the same key on every repeat of it. The key and its place (where it lands: your own feed or the company page of author_organization_id) are one article share whatever it says, and a repeat never goes out twice: it answers 200 with what the first send made (result.idempotent_replay, result.content_differs when this request says something else) or 409 naming error.context.send_outcome (in_flight, unknown with retry_after and send_decisive_at, or sent; not_sent with blocking_activity_log_sid when another article share in doubt holds the place). The same key at another place is another article share. Without a key the same commentary and article at the same place and slot count as a repeat for an hour after they went out. check_linkedin_posting_sent asks by it.
255A person's word that an earlier attempt of THIS send is not on LinkedIn: its activity_log_sid (ln_al_...), from the 409 or check_linkedin_posting_sent, given only after someone looked on LinkedIn. Taken once the attempt can no longer land (before that: 409 send_outcome_unknown, waiting_for may_still_land, retry_after and send_decisive_at that moment): it settles that attempt not_sent and this request goes out. Moot when the attempt is no longer in doubt; another send's sid is 422 not_this_message.
18^ln_al_A person's word that an earlier attempt of THIS send IS on LinkedIn: its activity_log_sid, as for confirmed_not_sent (never both). Taken at once; it settles the attempt sent and sends nothing: the answer is 409 concurrent_send_in_flight with send_outcome sent while what it made is not known (LinkedIn is read for it), or 200 with it once a read has found it. Another send's sid is 422 not_this_message; an attempt already proved not sent is 409 confirmed_sent_contradicts.
18^ln_al_Response
action success envelope.