curl --request POST \
--url https://api.aisa.one/apis/v1/unipile/linkedin/chats/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"attendees_ids": [
"<string>"
]
}
'import requests
url = "https://api.aisa.one/apis/v1/unipile/linkedin/chats/send"
payload = {
"account_id": "<string>",
"attendees_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '<string>', attendees_ids: ['<string>']})
};
fetch('https://api.aisa.one/apis/v1/unipile/linkedin/chats/send', 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.aisa.one/apis/v1/unipile/linkedin/chats/send",
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>',
'attendees_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.aisa.one/apis/v1/unipile/linkedin/chats/send"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"attendees_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.aisa.one/apis/v1/unipile/linkedin/chats/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"<string>\",\n \"attendees_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/unipile/linkedin/chats/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"<string>\",\n \"attendees_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"chat_id": "<string>",
"message_id": "<string>",
"object": "ChatStarted"
}Start Chat
Open a new conversation and send its first message.
curl --request POST \
--url https://api.aisa.one/apis/v1/unipile/linkedin/chats/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"attendees_ids": [
"<string>"
]
}
'import requests
url = "https://api.aisa.one/apis/v1/unipile/linkedin/chats/send"
payload = {
"account_id": "<string>",
"attendees_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '<string>', attendees_ids: ['<string>']})
};
fetch('https://api.aisa.one/apis/v1/unipile/linkedin/chats/send', 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.aisa.one/apis/v1/unipile/linkedin/chats/send",
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>',
'attendees_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.aisa.one/apis/v1/unipile/linkedin/chats/send"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"attendees_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.aisa.one/apis/v1/unipile/linkedin/chats/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"<string>\",\n \"attendees_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/unipile/linkedin/chats/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"<string>\",\n \"attendees_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"chat_id": "<string>",
"message_id": "<string>",
"object": "ChatStarted"
}subscription_required on this endpoint (LinkedIn only allows new chats with relations, InMail aside), and the account’s own profile is not a valid recipient either. To reach someone who is not yet connected, use the Connection Request endpoint — it is not subject to this restriction; message them after the invitation is accepted. Write action: same daily messaging limits as Send Message. Pass each recipient’s provider id (ACoAA…), which you can resolve from a public identifier with the User Profile endpoint. If a call does time out, verify the actual outcome via List Chats and the sent-invitations list before retrying.
See Pricing for current prices. Where supported, get a quote for your request.
Example
curl -X POST "https://api.aisa.one/apis/v1/unipile/linkedin/chats/send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"account_id": "YOUR_ACCOUNT_ID", "attendees_ids": ["ACoAABcDEFGhIJKlMNOpQRsTUvWXYz1234"], "text": "Hi! Following up on our last conversation."}'
Request contract
- Method and path: POST /apis/v1/unipile/linkedin/chats/send
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/unipile/linkedin/chats/send
{
"operationId": "post_unipile_linkedin_start_chat",
"method": "POST",
"path": "/apis/v1/unipile/linkedin/chats/send",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"account_id": {
"description": "An Unipile account id.",
"minLength": 1,
"title": "AccountIdParam",
"type": "string"
},
"attendees_ids": {
"description": "One or more attendee provider ID.\nFor `instagram`, please use the 'provider_messaging_id'.\nFor LinkedIn users, use a `provider_id` starting with: ACo for classic, ACw for Sales Navigator, AE for Recruiter.\nFor LinkedIn company messaging, please use the 'messaging_id'.\nFor WhatsApp, please use '00000000@s.whatsapp.net'.",
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"subject": {
"description": "An optional field to set the subject of the conversation.",
"type": "string"
},
"text": {
"description": "The message that will start the new conversation.\nWith LinkedIn recruiter, a range of HTML tags can be used directly in the body of the message to enhance the presentation. The supported tags are <strong> for bold text, <em> for italic text, <a href=\"www.my-link.com\"> for external links, <ul> for unordered lists, <ol> for ordered lists and <li> for list items. Tags can be nested into each other if necessary.",
"type": "string"
}
},
"required": [
"account_id",
"attendees_ids"
],
"type": "object"
}
},
"multipart/form-data": {
"schema": {
"properties": {
"account_id": {
"description": "An Unipile account id.",
"minLength": 1,
"title": "AccountIdParam",
"type": "string"
},
"attachments": {
"items": {
"format": "binary",
"type": "string"
},
"type": "array"
},
"attendees_ids": {
"description": "One or more attendee provider ID.\nFor `instagram`, please use the 'provider_messaging_id'.\nFor LinkedIn users, use a `provider_id` starting with: ACo for classic, ACw for Sales Navigator, AE for Recruiter.\nFor LinkedIn company messaging, please use the 'messaging_id'.\nFor WhatsApp, please use '00000000@s.whatsapp.net'.",
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"linkedin": {
"anyOf": [
{
"description": "Standard Linkedin fields",
"properties": {
"api": {
"description": "The Linkedin API that should be used to start chatting (relative feature must be subscribed). Default is classic.",
"enum": [
"classic"
],
"type": "string"
},
"applicant_id": {
"description": "Mandatory to start a conversation with a job applicant. Use the <strong>List all job postings</strong> route first to retrieve the job posting, and then the <strong>List all applicants to a job posting</strong> route to get the applicant details.",
"type": "string"
},
"group_id": {
"description": "Mandatory to start a conversation with a user within a Group context.",
"type": "string"
},
"inmail": {
"description": "If set to true, start the new conversation with an inMail.",
"type": "boolean"
},
"invitation_id": {
"description": "Mandatory to start a conversation with a user from whom you received an invitation that you have neither accepted nor declined yet.",
"type": "string"
},
"topic": {
"description": "Mandatory to start a conversation with a company.",
"enum": [
"service_request",
"request_demo",
"support",
"careers",
"other"
],
"type": "string"
}
},
"title": "Classic options",
"type": "object"
},
{
"description": "Recruiter Linkedin fields",
"properties": {
"api": {
"description": "The Linkedin API that should be used to start chatting (relative feature must be subscribed).",
"enum": [
"recruiter"
],
"type": "string"
},
"email_address": {
"description": "The email address of the recipient in case the chat should be started with email instead of inMail",
"type": "string"
},
"follow_up": {
"description": "Allows to schedule a follow-up message. Available for Recruiter PRO account owners only.",
"properties": {
"attachments": {
"items": {
"format": "binary",
"type": "string"
},
"type": "array"
},
"scheduled_time": {
"anyOf": [
{
"properties": {
"days": {
"description": "The number of days from here to send the follow-up message.",
"maximum": 28,
"minimum": 3,
"type": "number"
},
"timezone": {
"description": "The timezone from which the follow-up message is scheduled. Example: 'Europe/Paris', 'America/Phoenix'...",
"type": "string"
}
},
"required": [
"days",
"timezone"
],
"title": "Days based",
"type": "object"
},
{
"properties": {
"timezone": {
"description": "The timezone from which the follow-up message is scheduled. Example: 'Europe/Paris', 'America/Phoenix'...",
"type": "string"
},
"weeks": {
"description": "The number of weeks from here to send the follow-up message.",
"maximum": 4,
"minimum": 1,
"type": "number"
}
},
"required": [
"weeks",
"timezone"
],
"title": "Weeks based",
"type": "object"
}
]
},
"subject": {
"description": "The subject for the follow-up message.",
"type": "string"
},
"text": {
"description": "The textual content for the follow-up message.",
"type": "string"
}
},
"required": [
"subject",
"text",
"scheduled_time"
],
"title": "Follow-up config",
"type": "object"
},
"hiring_project_id": {
"description": "The ID of the project the chat should be started in",
"type": "string"
},
"inmail_intent": {
"description": "The intent of the InMail. Default value will be HIRE_FOR_CLIENT.",
"enum": [
"HIRE_FOR_CLIENT",
"HIRE_FOR_OWN_COMPANY"
],
"type": "string"
},
"job_posting_id": {
"description": "The ID of the related job posting in case of an initial contact with a candidate",
"type": "string"
},
"signature": {
"description": "The signature of the sender",
"type": "string"
},
"sourcing_channel": {
"description": "The project's sourcing channel used to start a recruiter conversation.",
"enum": [
"JOB_POSTING_RECOMMENDED_MATCHES",
"JOB_POSTING",
"REFERRAL",
"INTERNAL_CANDIDATES",
"AUTOMATED_SOURCING",
"RECRUITER_SEARCH",
"CAREER_SITE"
],
"type": "string"
},
"visibility": {
"description": "Define the level of visibility of the conversation within your organization. Default value will be PRIVATE.",
"enum": [
"PUBLIC",
"PRIVATE",
"PROJECT"
],
"type": "string"
}
},
"required": [
"api"
],
"title": "Recruiter options",
"type": "object"
},
{
"description": "Sales Navigator Linkedin fields",
"properties": {
"api": {
"description": "The Linkedin API that should be used to start chatting (relative features must be subscribed).",
"enum": [
"sales_navigator"
],
"type": "string"
}
},
"required": [
"api"
],
"title": "Sales Navigator options",
"type": "object"
}
],
"description": "Extra fields for Linkedin products"
},
"subject": {
"description": "An optional field to set the subject of the conversation.",
"type": "string"
},
"text": {
"description": "The message that will start the new conversation.\nWith LinkedIn recruiter, a range of HTML tags can be used directly in the body of the message to enhance the presentation. The supported tags are <strong> for bold text, <em> for italic text, <a href=\"www.my-link.com\"> for external links, <ul> for unordered lists, <ol> for ordered lists and <li> for list items. Tags can be nested into each other if necessary.",
"type": "string"
},
"video_message": {
"description": "(Linkedin) A file to send as video message. WhatsApp: use attachments field.",
"format": "binary",
"type": "string"
},
"voice_message": {
"description": "(Linkedin | WhatsApp) A file to send as voice message. WhatsApp: prefer .mp3 or .m4a. Linkedin: prefer .m4a. Instagram: use the attachment field and prefer .m4a. Telegram: use the attachment field.",
"format": "binary",
"type": "string"
}
},
"required": [
"account_id",
"attendees_ids"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Published reference price: $0.02 USD per successful request. Your account price may differ; use a request quote where supported.Authorizations
Body
One or more attendee provider ID.
For instagram, please use the 'provider_messaging_id'.
For LinkedIn users, use a provider_id starting with: ACo for classic, ACw for Sales Navigator, AE for Recruiter.
For LinkedIn company messaging, please use the 'messaging_id'.
For WhatsApp, please use '00000000@s.whatsapp.net'.
1The message that will start the new conversation. With LinkedIn recruiter, a range of HTML tags can be used directly in the body of the message to enhance the presentation. The supported tags are <strong> for bold text, <em> for italic text, <a href="www.my-link.com"> for external links, <ul> for unordered lists, <ol> for ordered lists and <li> for list items. Tags can be nested into each other if necessary.