> ## 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

# 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 定义](https://aisa.one/docs/openapi/zh/unipile.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "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 &lt;strong&gt; for bold text, &lt;em&gt; for italic text, &lt;a href=\"www.my-link.com\"&gt; for external links, &lt;ul&gt; for unordered lists, &lt;ol&gt; for ordered lists and &lt;li&gt; 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 &lt;strong&gt; for bold text, &lt;em&gt; for italic text, &lt;a href=\"www.my-link.com\"&gt; for external links, &lt;ul&gt; for unordered lists, &lt;ol&gt; for ordered lists and &lt;li&gt; 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"
      }
    }
  }
}
```

## 费用与请求规则

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


## OpenAPI

````yaml openapi/zh/unipile.json POST /apis/v1/unipile/linkedin/chats/send
openapi: 3.1.0
info:
  description: ''
  title: Unipile (LinkedIn)
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    unipile:
      description: ''
      title: Unipile (LinkedIn)
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 00b882f06149b4c72a4dc077c20cc1c4d86d5a8da50fcc725538d6debed194ac
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/unipile/accounts
    - /apis/v1/unipile/hosted/link
    - /apis/v1/unipile/linkedin/chats
    - /apis/v1/unipile/linkedin/chats/send
    - /apis/v1/unipile/linkedin/chats/{chat_id}/messages
    - /apis/v1/unipile/linkedin/chats/{chat_id}/messages/send
    - /apis/v1/unipile/linkedin/company/{identifier}
    - /apis/v1/unipile/linkedin/connection-requests/send
    - /apis/v1/unipile/linkedin/invitations/received
    - /apis/v1/unipile/linkedin/invitations/sent
    - /apis/v1/unipile/linkedin/invitations/sent/{invitation_id}
    - /apis/v1/unipile/linkedin/me
    - >-
      /apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}
    - /apis/v1/unipile/linkedin/messages/{message_id}/reaction
    - /apis/v1/unipile/linkedin/posts
    - /apis/v1/unipile/linkedin/posts/reaction/send
    - /apis/v1/unipile/linkedin/posts/{post_id}
    - /apis/v1/unipile/linkedin/posts/{post_id}/comments
    - /apis/v1/unipile/linkedin/posts/{post_id}/comments/send
    - /apis/v1/unipile/linkedin/recruiter/job-slots-credits/{account_id}
    - /apis/v1/unipile/linkedin/relations
    - /apis/v1/unipile/linkedin/search
    - /apis/v1/unipile/linkedin/search/parameters
    - /apis/v1/unipile/linkedin/users/{identifier}
    - /apis/v1/unipile/linkedin/users/{user_id}/posts
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:767072c42d9ff02e79a61a06a858bae7b85c1868dd65963f411c7183d1137934
    facts_hash: 00b882f06149b4c72a4dc077c20cc1c4d86d5a8da50fcc725538d6debed194ac
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: unipile
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/unipile/linkedin/chats/send:
    post:
      tags:
        - linkedin-messaging
      summary: Start Chat
      description: >-
        Start a new conversation with one or more attendee. ⚠️ Interactive
        documentation does not work for Linkedin specific parameters (child
        parameters not correctly applied in snippet), the correct format is
        linkedin[inmail] = true, linkedin[api]...


        Start a new LinkedIn conversation and send the first message. Supports
        text, attachments, voice notes, video; InMail to non-connections via
        linkedin[inmail]=true + subject; recruiter follow-up scheduling via
        linkedin[follow_up]. Write action: daily limits apply.
      operationId: post_unipile_linkedin_start_chat
      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.

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

                    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 &lt;strong&gt; for bold
                    text, &lt;em&gt; for italic text, &lt;a
                    href="www.my-link.com"&gt; for external links, &lt;ul&gt;
                    for unordered lists, &lt;ol&gt; for ordered lists and
                    &lt;li&gt; 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.

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

                    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 &lt;strong&gt; for bold
                    text, &lt;em&gt; for italic text, &lt;a
                    href="www.my-link.com"&gt; for external links, &lt;ul&gt;
                    for unordered lists, &lt;ol&gt; for ordered lists and
                    &lt;li&gt; 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
      responses:
        '201':
          content:
            application/json:
              schema:
                properties:
                  chat_id:
                    anyOf:
                      - type: string
                      - {}
                    description: The Unipile ID of the newly started chat.
                  message_id:
                    anyOf:
                      - type: string
                      - {}
                    description: The Unipile ID of the message the chat started with.
                  object:
                    enum:
                      - ChatStarted
                    type: string
                required:
                  - object
                  - chat_id
                  - message_id
                type: object
          description: Created. New chat created and message sent successfully.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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