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

# Send an invitation

> Send a LinkedIn connection request with an optional note.

Sends a connection request, with an optional note, from a connected account. Price: \$0.02 in production. Requires a connected account with the `invite` grant and an `Idempotency-Key` header. The default limit is 25 invitations per connected account per UTC day, shared across callers. Standard API rate limits also apply. There is no additional invitation pacing.

<ParamField body="account_id" type="string" required>OneShot LinkedIn account ID.</ParamField>
<ParamField body="profile" type="string" required>HTTPS linkedin.com/in/ profile URL or provider ID.</ParamField>
<ParamField body="note" type="string">Optional message, preserved verbatim. At most 300 Unicode characters. LinkedIn may impose a shorter account-specific limit or a custom-note allowance.</ParamField>

**Response.** HTTP 202 returns `request_id`, `receipt_id`, and `linkedin.invitation_id`. Save the stable OneShot invitation ID to [withdraw](/api-reference/linkedin/withdraw) the invitation, including while it is queued. Poll `GET /v1/requests/{request_id}` for completion. SDK methods wait by default.

**Result.** Completed results contain `action_request_id`, `invitation_id`, `status` (`sent`, `already_connected`, or `pending`), and `provider_invitation_id` when available. Duplicate targets return the original invitation ID. A provider-observed external invitation has `tracked: false` and cannot be withdrawn through this API.

**Failures.** Failures expose codes such as `email_required`, `note_limit_reached`, `note_too_long`, `rate_limited`, and `account_send_limit`. Retry timing is returned when known. The SDK throws structured errors. Execution failures carry details in the job result/partial result.

**Uncertain sends.** An uncertain send stays `processing` with `send_status: ambiguous`. After 24 hours without evidence, its result reports `send_unverified`. OneShot does not blindly resend or automatically refund it. To recover the request, retry the same operation with the same key, not a new one.

```typescript theme={null}
const invitation = await agent.linkedinInvite({
  accountId,
  profile: 'https://www.linkedin.com/in/jane-doe/',
  note: 'Enjoyed your presentation.',
  idempotencyKey: 'event-jane-invite',
});
```

```python theme={null}
invitation = client.linkedin_invite(account_id, "https://www.linkedin.com/in/jane-doe/",
                                   note="Enjoyed your presentation.", idempotency_key="event-jane-invite")
```


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