跳转到主要内容
POST
Start Chat
一次调用创建新会话并发出首条消息。LinkedIn 规则:收件人必须已是一度人脉——先用「人脉列表」端点列出已有连接并使用其中的 provider id。给非人脉在此端点发消息会收到 403 subscription_required(LinkedIn 只允许与一度人脉开新会话,InMail 除外),账号自己的资料也不是有效收件人。要触达尚未连接的人,请用「发送建联邀请」端点——它不受此限制;对方接受后再回来发消息。写操作:与「发送消息」相同的每日限额。收件人传 provider id(ACoAA…),可先用「用户资料」端点从公共标识解析出来。若调用超时,先通过「会话列表」和已发建联列表核实实际结果,再决定是否重试。 当前价格请查看费用说明;支持报价的接口可按实际请求获取报价。

请求规范

  • 方法与路径: POST /apis/v1/unipile/linkedin/chats/send
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/unipile/linkedin/chats/send
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

公开参考价格:每次成功请求 $0.02 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

account_id
string
必填

An Unipile account id.

Minimum string length: 1
attendees_ids
string[]
必填

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'.

Minimum array length: 1
subject
string

An optional field to set the subject of the conversation.

text
string

The 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.

响应

Created. New chat created and message sent successfully.

chat_id
必填

The Unipile ID of the newly started chat.

message_id
必填

The Unipile ID of the message the chat started with.

object
enum<string>
必填
可用选项:
ChatStarted