curl --request POST \
--url https://app.gtm-api.com/linkedin/v4/api/linkedin-custom/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"linkedin_account_sid": "<string>",
"url": "<string>",
"headers": {},
"body": {},
"form": true,
"include_default_headers": true
}
'import requests
url = "https://app.gtm-api.com/linkedin/v4/api/linkedin-custom/execute"
payload = {
"linkedin_account_sid": "<string>",
"url": "<string>",
"headers": {},
"body": {},
"form": True,
"include_default_headers": True
}
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>',
url: '<string>',
headers: {},
body: JSON.stringify({}),
form: true,
include_default_headers: true
})
};
fetch('https://app.gtm-api.com/linkedin/v4/api/linkedin-custom/execute', 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-custom/execute",
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>',
'url' => '<string>',
'headers' => [
],
'body' => [
],
'form' => true,
'include_default_headers' => true
]),
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-custom/execute"
payload := strings.NewReader("{\n \"linkedin_account_sid\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"form\": true,\n \"include_default_headers\": true\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-custom/execute")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"linkedin_account_sid\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"form\": true,\n \"include_default_headers\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/linkedin/v4/api/linkedin-custom/execute")
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 \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"form\": true,\n \"include_default_headers\": true\n}"
response = http.request(request)
puts response.read_bodyExecute custom LinkedIn request (escape hatch)
ESCAPE HATCH: issue one arbitrary LinkedIn HTTP call (url + GET/POST + headers/body) under a chosen OWN account, for endpoints the typed methods do not cover. May be a read or an action (apply to a job, attend an event), so you own the semantics. High-risk: admin-gated + feature-flagged; the url must match the server host allowlist (else 403 forbidden_endpoint). OWN-ACCOUNT ONLY: linkedin_account_sid is REQUIRED. It spends the account’s custom_request bucket, which returns 429 when saturated. A non-2xx response is still a successful dispatch (ok=false, status_code carries it; never throws). The response comes back inline, NOT stored; the audit is the linkedin-account-activity-log row (action_type=custom_request). PREFER TYPED METHODS FIRST: searches/lists → linkedin-scraping; one profile/company/post’s own data → linkedin-enrichment; sends/invites/reactions/comments → messaging & networking. Never use it to route around a rate limit or a missing permission.
Contract:
- MCP tool
execute_linkedin_custom_request, registry packagemcp.linkedin/linkedin_custom_requests, mountlinkedin.platform. - 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
custom_requestsmart-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-custom/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"linkedin_account_sid": "<string>",
"url": "<string>",
"headers": {},
"body": {},
"form": true,
"include_default_headers": true
}
'import requests
url = "https://app.gtm-api.com/linkedin/v4/api/linkedin-custom/execute"
payload = {
"linkedin_account_sid": "<string>",
"url": "<string>",
"headers": {},
"body": {},
"form": True,
"include_default_headers": True
}
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>',
url: '<string>',
headers: {},
body: JSON.stringify({}),
form: true,
include_default_headers: true
})
};
fetch('https://app.gtm-api.com/linkedin/v4/api/linkedin-custom/execute', 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-custom/execute",
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>',
'url' => '<string>',
'headers' => [
],
'body' => [
],
'form' => true,
'include_default_headers' => true
]),
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-custom/execute"
payload := strings.NewReader("{\n \"linkedin_account_sid\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"form\": true,\n \"include_default_headers\": true\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-custom/execute")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"linkedin_account_sid\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"form\": true,\n \"include_default_headers\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/linkedin/v4/api/linkedin-custom/execute")
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 \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"form\": true,\n \"include_default_headers\": true\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Body
Request body of execute_linkedin_custom_request.
REQUIRED executor: the OWN account (ln_ac_…) the call runs as. Every custom request runs on the account named here, carrying that account's session, permissions and limits, so name the account whose identity the request should carry. There is no default and no substitute: omit it and the call is rejected.
18^ln_ac_Absolute LinkedIn URL (e.g. "https://www.linkedin.com/voyager/api/…") or a bare path (resolved against https://www.linkedin.com). MUST match the server host + path allowlist (provisional: *.linkedin.com + path prefixes /voyager/api/, /sales-api/). Otherwise 403 forbidden_endpoint.
1 - 2048Response
action success envelope.