This page documents the canonical HTTP contract for this endpoint.
This route requires an authenticated user session. Developer API keys are explicitly blocked. It sends a real LinkedIn message and requires an authorized LinkedIn sender account; the optional sender_account_id selects one and is checked against the caller’s permissions. Without it, the caller’s default sender account is resolved.
Two sending modes
- Existing chat — Provide
chat_idto reply in an existing LinkedIn conversation. - New message / InMail — Provide
recipient_slugto message a profile.inmail: truerequests InMail behavior; account policy and resolved recipient relationship still govern sending.
The handler runs the send in the request and returns the provider result (the fields under result can vary); it is not an asynchronous job-creation endpoint. Provide one of chat_id or recipient_slug. If both are present, the handler takes the chat path. Policy deferrals return 429 with an error object that can include retry_at; unreachable recipients can return 422. Use request_id when you need a durable receipt across a lost HTTP response; a 409 pending/ambiguous receipt requires checking the conversation before another send.
Body parameters
request_id· optionalstring
Optional send receipt key, 16–100 characters matching letters, digits, underscore, or hyphen. Reusing it with the same payload replays its recorded success or failure; reusing it with another payload returns 409. A pending or ambiguous outcome also returns 409, so check the LinkedIn conversation before retrying.
sender_account_id· optionalstring
Authorized LinkedIn sender account to use. Omit to resolve the caller’s default LinkedIn sender. Access is checked for the caller and requested send/reply scope.
chat_id· optionalstring
Existing chat ID for sending a reply. When both `chat_id` and `recipient_slug` are supplied, the handler follows the chat/reply path.
recipient_slug· optionalstring
LinkedIn public profile slug for starting a new message or InMail. Send this or `chat_id`; the handler returns 400 if neither is supplied.
textrequiredstring
Message text sent to LinkedIn. No length bound is declared by this request model.
inmail· optionalboolean
Requests InMail behavior for a new-recipient send; policy and the resolved recipient relationship determine whether the send is allowed. Default: false.
linkedin_api· optionalstring
Accepted with default `classic` by the request model, but the handler uses the selected sender account’s resolved mode; this field does not override it.
| Name | Type | Description |
|---|---|---|
| request_id | string | Optional send receipt key, 16–100 characters matching letters, digits, underscore, or hyphen. Reusing it with the same payload replays its recorded success or failure; reusing it with another payload returns 409. A pending or ambiguous outcome also returns 409, so check the LinkedIn conversation before retrying. |
| sender_account_id | string | Authorized LinkedIn sender account to use. Omit to resolve the caller’s default LinkedIn sender. Access is checked for the caller and requested send/reply scope. |
| chat_id | string | Existing chat ID for sending a reply. When both `chat_id` and `recipient_slug` are supplied, the handler follows the chat/reply path. |
| recipient_slug | string | LinkedIn public profile slug for starting a new message or InMail. Send this or `chat_id`; the handler returns 400 if neither is supplied. |
| textrequired | string | Message text sent to LinkedIn. No length bound is declared by this request model. |
| inmail | boolean | Requests InMail behavior for a new-recipient send; policy and the resolved recipient relationship determine whether the send is allowed. Default: false. |
| linkedin_api | string | Accepted with default `classic` by the request model, but the handler uses the selected sender account’s resolved mode; this field does not override it. |
Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid user session. |
| 403 | Developer API keys are blocked for this session-only route. |
| 400 | Organization/user context is missing, LinkedIn is not connected, no default sender exists, or both chat_id and recipient_slug are absent. |
| 403 | The caller is not authorized to use the selected sender account. |
| 404 | The specified sender_account_id was not found in the organization. |
| 409 | The sender account is not ready, has an incompatible provider/capability, or request_id is bound to another payload or an earlier send is pending/ambiguous. |
| 429 | Send deferred by account policy; detail can include retry_at. |
| 502 | Send/provider failure; an ambiguous provider outcome may leave the request receipt pending. |
| 503 | Unipile LinkedIn integration is not configured. |
| 422 | Request body validation failed, request_id failed its length/character constraints, or the recipient cannot receive messages. |
