---
title: "Send an InMail"
method: POST
path: "/v1/{account_id}/messages/inmail"
tags: ["Messaging"]
---

# Send an InMail

`POST /v1/{account_id}/messages/inmail`

## Request

- Base URL: `https://api.curviate.com`
- URL: `https://api.curviate.com/v1/{account_id}/messages/inmail`
- Auth: HTTP bearer

Sends a LinkedIn InMail from the account's own premium InMail credits to a member who is not a direct connection.

## Path parameters

- `account_id` string, required

## Request body

- object
  - `recipient_urn` string, required: LinkedIn member URN (`urn:li:member:<id>`) or member provider id (`ACo...`).
  - `subject` string, required: InMail subject line (1-200 chars).
  - `text` string, required: InMail body text (1-8000 chars). This call keeps nothing and logs nothing. Once sent it is a message in the account's InMail inbox, so reading that chat back through Curviate stores its body in your tenant's inbox records, with no expiry.

## Response `201`

InMail sent. Returns message_id and chat_id.

- object
  - `object` 'inmail_sent', required: Response type discriminator.
  - `message_id` union, required: The InMail message identifier. Null when no message was actually sent, and an array when the message was delivered as several messages, one per attachment. Confirm the send with chat_id, which is always present.
    - string
    - string[]
  - `chat_id` string, required: The conversation thread identifier.
  - `safety_warning` SafetyWarning: Present on a successful response when this account crossed an account-safety ceiling while the affected budget row is on the default warn posture. The action still happened. Field-identical to the BUDGET_EXHAUSTED error body except that blocked is false and hint.message describes the outcome, so one branch handles both postures and switching the account to enforce is a configuration change rather than a client rewrite.
    - `row` string, nullable, required: The budget row that breached, for example profile_views or pending_invites. Null when the breach is not about a row: an activity_window warning on an action that spends no budget of its own (editing a message, dismissing a notification, a Recruiter or Sales Navigator admin action) is still governed by the hours the account works in. Read hint.parameter for what to change; whenever this is null it names posture, because the activity window edges are set per action type and this action has none, so the levers that reach it are the account timezone and posture.
    - `reset_at` string, nullable, required: The instant the refusal lifts: the window roll on a ceiling refusal, the next window open on an activity-window one. Null in the two cases no clock frees, the pending_invites gauge and InMail credits (row inmail).
    - `hint` object, required
      - `parameter` string, required: The settable parameter on PATCH /v1/{account_id}/safety-policy.
      - `message` string, required: What the condition is and what changing that parameter would do. This is the one field whose text differs from the BUDGET_EXHAUSTED refusal: here it says the action went through, and on a ceiling breach how far past the ceiling this row now stands, rather than telling you to set posture to warn when it already is. Branch on parameter, reason and blocked, never on this text.
    - `reason` 'ceiling' | 'activity_window', required: Which rule was crossed. ceiling means the row's configured limit is spent; activity_window means the account is outside the hours it works in, which is a different fact with a different remedy. hint.parameter names the right setting for each.
    - `blocked` boolean, required: Always false here. True on the BUDGET_EXHAUSTED refusal carrying the same payload.

## Other responses

- `400`: Invalid request: missing required fields or malformed recipient_urn.
- `401`: Missing or invalid API key.
- `403`: The account is missing the InMail credits or premium subscription needed to send.
- `404`: The supplied account_id does not belong to this tenant. An id whose connection was replaced or removed also stops resolving here, and it is already absent from the list, so re-read `GET /v1/accounts` for the current id.
- `413`: Payload too large, the request body exceeds the size limit.
- `422`: The recipient is unreachable via InMail.
- `429`: Rate limited.
- `500`: Internal error.
- `502`: A temporary error occurred. Please try again.
- `503`: Service unavailable.
- `504`: Gateway timeout.

---

[API](https://skmtc.dev/curviate/apis/curviate-api.md) · [All operations](https://skmtc.dev/curviate/apis/curviate-api/llms.txt) · [OpenAPI document](https://skmtc.dev/curviate/apis/curviate-api/revisions/eab848801d95?raw)
