Send an invitation
curl --request POST \
--url https://win.oneshotagent.com/v1/tools/linkedin/invite \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"profile": "<string>",
"note": "<string>"
}
'import requests
url = "https://win.oneshotagent.com/v1/tools/linkedin/invite"
payload = {
"account_id": "<string>",
"profile": "<string>",
"note": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '<string>', profile: '<string>', note: '<string>'})
};
fetch('https://win.oneshotagent.com/v1/tools/linkedin/invite', 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://win.oneshotagent.com/v1/tools/linkedin/invite",
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([
'account_id' => '<string>',
'profile' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://win.oneshotagent.com/v1/tools/linkedin/invite"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"profile\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://win.oneshotagent.com/v1/tools/linkedin/invite")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"<string>\",\n \"profile\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/tools/linkedin/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"<string>\",\n \"profile\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyLinkedIn
Send an invitation
Send a LinkedIn connection request with an optional note.
POST
/
v1
/
tools
/
linkedin
/
invite
Send an invitation
curl --request POST \
--url https://win.oneshotagent.com/v1/tools/linkedin/invite \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"profile": "<string>",
"note": "<string>"
}
'import requests
url = "https://win.oneshotagent.com/v1/tools/linkedin/invite"
payload = {
"account_id": "<string>",
"profile": "<string>",
"note": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '<string>', profile: '<string>', note: '<string>'})
};
fetch('https://win.oneshotagent.com/v1/tools/linkedin/invite', 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://win.oneshotagent.com/v1/tools/linkedin/invite",
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([
'account_id' => '<string>',
'profile' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://win.oneshotagent.com/v1/tools/linkedin/invite"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"profile\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://win.oneshotagent.com/v1/tools/linkedin/invite")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"<string>\",\n \"profile\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/tools/linkedin/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"<string>\",\n \"profile\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySends a connection request, with an optional note, from a connected account. Price: $0.02 in production. Requires a connected account with the
Response. HTTP 202 returns
invite grant and an Idempotency-Key header. The default limit is 25 invitations per connected account per UTC day, shared across callers. Standard API rate limits also apply. There is no additional invitation pacing.
string
required
OneShot LinkedIn account ID.
string
required
HTTPS linkedin.com/in/ profile URL or provider ID.
string
Optional message, preserved verbatim. At most 300 Unicode characters. LinkedIn may impose a shorter account-specific limit or a custom-note allowance.
request_id, receipt_id, and linkedin.invitation_id. Save the stable OneShot invitation ID to withdraw the invitation, including while it is queued. Poll GET /v1/requests/{request_id} for completion. SDK methods wait by default.
Result. Completed results contain action_request_id, invitation_id, status (sent, already_connected, or pending), and provider_invitation_id when available. Duplicate targets return the original invitation ID. A provider-observed external invitation has tracked: false and cannot be withdrawn through this API.
Failures. Failures expose codes such as email_required, note_limit_reached, note_too_long, rate_limited, and account_send_limit. Retry timing is returned when known. The SDK throws structured errors. Execution failures carry details in the job result/partial result.
Uncertain sends. An uncertain send stays processing with send_status: ambiguous. After 24 hours without evidence, its result reports send_unverified. OneShot does not blindly resend or automatically refund it. To recover the request, retry the same operation with the same key, not a new one.
const invitation = await agent.linkedinInvite({
accountId,
profile: 'https://www.linkedin.com/in/jane-doe/',
note: 'Enjoyed your presentation.',
idempotencyKey: 'event-jane-invite',
});
invitation = client.linkedin_invite(account_id, "https://www.linkedin.com/in/jane-doe/",
note="Enjoyed your presentation.", idempotency_key="event-jane-invite")