> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# 发起会话

> 发起新会话并发送首条消息。

一次调用创建新会话并发出首条消息。**LinkedIn 规则：收件人必须已是一度人脉**——先用「人脉列表」端点列出已有连接并使用其中的 provider id。给非人脉在此端点发消息会收到 403 `subscription_required`（LinkedIn 只允许与一度人脉开新会话，InMail 除外），账号自己的资料也不是有效收件人。**要触达尚未连接的人，请用「发送建联邀请」端点**——它不受此限制；对方接受后再回来发消息。写操作：与「发送消息」相同的每日限额。收件人传 provider id（`ACoAA…`），可先用「用户资料」端点从公共标识解析出来。若调用超时，先通过「会话列表」和已发建联列表核实实际结果，再决定是否重试。

参考价格：每次成功请求 \$0.02 USD。


## OpenAPI

````yaml openapi/zh/unipile.json POST /apis/v1/unipile/linkedin/chats/send
openapi: 3.1.0
info:
  title: Unipile LinkedIn API
  version: 1.0.0
  description: >-
    LinkedIn data and messaging through your connected accounts: profiles,
    companies, chats, posts, network, structured search, and Recruiter job-slot
    credits. Bring your own LinkedIn account (connect once through the hosted
    authorization link), then read and act through one AIsa credential.
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
tags:
  - name: Accounts
    description: Connected-account discovery and binding liveness.
  - name: Profiles
    description: Member and company profiles.
  - name: Messaging
    description: Conversations, messages, and attachments.
  - name: Posts
    description: Member posts and their comments.
  - name: Network
    description: Connections and invitations.
  - name: Search
    description: Structured LinkedIn search and its parameter helper.
  - name: Recruiter
    description: Recruiter contract quota endpoints.
paths:
  /apis/v1/unipile/linkedin/chats/send:
    post:
      tags:
        - Messaging
      summary: Start Chat
      description: >-
        Creates a LinkedIn conversation with one or more members and sends the
        opening message in a single call. **LinkedIn rule: the recipient must
        already be a 1st-degree connection** — list your connections first with
        the Relations endpoint and use those provider ids. Messaging a
        non-connection returns 403 `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. $0.02 per request.
      operationId: post_unipile_linkedin_start_chat
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
                - attendees_ids
                - text
              properties:
                account_id:
                  type: string
                  description: Connected account id the message is sent from.
                attendees_ids:
                  type: array
                  description: >-
                    Provider ids (`ACoAA…`) of the recipients — must be
                    1st-degree connections of the account.
                  items:
                    type: string
                text:
                  type: string
                  description: Opening message body.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                      - MessageSent
        '401':
          description: Missing or invalid API key.
        '402':
          description: Insufficient balance.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.