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

# Connected Accounts

> List, inspect, reconnect and revoke the LinkedIn accounts connected to this agent.

Each account read returns its status, grant, idle deadline, and sync coverage. Free, proof-signed. Accounts are owner-scoped: another agent's account id returns `404`.

Account reads expose little. They never include the upstream provider's account reference, LinkedIn's internal member id, or any hosted URL. The only LinkedIn-side identifier returned is `member_urn`, the human's **public** profile slug (the part after `linkedin.com/in/`), so you can show which account is connected. `id` is OneShot's account id, which every other endpoint takes.

## Endpoints

| Method | Path | Purpose |
| - | - | - |
| `GET` | `/v1/tools/linkedin/accounts?include_revoked=true` | List accounts (revoked ones hidden by default). |
| `GET` | `/v1/tools/linkedin/accounts/{id}` | One account. |
| `POST` | `/v1/tools/linkedin/accounts/{id}/reconnect` | Hosted reconnect link. See [Connect](/api-reference/linkedin/connect#reconnect). |
| `DELETE` | `/v1/tools/linkedin/accounts/{id}` | Revoke. |
| `GET` | `/v1/tools/linkedin/accounts/{id}/sync` | Coverage and recent runs. See [Sync](/api-reference/linkedin/sync). |

## Account shape

```json theme={null}
{
  "id": "6c1e…",
  "status": "connected",
  "display_name": "Jane Doe",
  "member_urn": "jane-doe",
  "allowed_actions": ["read", "reply"],
  "grant_version": 1,
  "connected_at": "2026-09-15T12:03:11.000Z",
  "reconnected_at": null,
  "last_status_at": "2026-09-15T12:03:11.000Z",
  "revoked_at": null,
  "reconnect_required": false,
  "idle_revoke_at": "2026-10-15T12:03:11.000Z",
  "sync": {
    "history_sync_status": "done",
    "history_sync_completed_at": "2026-09-15T12:40:00.000Z",
    "coverage_earliest_at": "2025-02-01T09:12:00.000Z",
    "coverage_latest_at": "2026-09-15T11:58:00.000Z",
    "last_full_enumeration_at": "2026-09-15T12:45:00.000Z",
    "last_incremental_at": "2026-09-15T18:00:00.000Z",
    "last_webhook_at": "2026-09-15T18:21:00.000Z",
    "message_count": 393,
    "conversation_count": 113
  }
}
```

### `status`

| Value | Meaning | What to do |
| - | - | - |
| `connected` | Usable. | Nothing. |
| `reconnect_required` | LinkedIn session lost (password change, checkpoint, expiry) or a write was refused as unauthorized. Queued writes were cancelled. | Issue a reconnect link. |
| `error` | The provider stopped syncing this account. | Wait. If it persists, reconnect. |
| `revoked` | Grant ended (by the agent, or automatically after 30 idle days). | Connect again to start over. |
| `deleted_upstream` | The human removed the connection at the provider. | Connect again. |

`grant_version` increments whenever the grant changes (narrowing on reconnect, revoke). Writes queued under an older version are cancelled at execution instead of sent.

## Revoke

Revoke ends the grant immediately and stops the upstream bill. `DELETE /v1/tools/linkedin/accounts/{id}` does the following:

* `allowed_actions` becomes empty and `grant_version` increments.
* Every **pending** write is cancelled and its job fails with `grant_revoked` (eligible for the failed-job refund sweep). A write already executing is left to the worker's own check.
* Open reconnect links are cancelled.
* The upstream connection is deleted so it stops billing (the lifecycle sweep retries if the provider is down).
* Stored conversations and messages are kept for 30 days for audit, then purged.

```json theme={null}
{ "id": "6c1e…", "status": "revoked", "revoked_at": "…", "cancelled_sends": 2, "upstream_deleted": true }
```

Revoking twice returns `200` and does nothing.

## Idle policy

An unused account revokes itself. Any owner-authorized read of the account updates `last_authorized_call_at` (at most hourly). Twenty-three days without one sets a warning. Thirty days revokes the account automatically (`revoked_reason: idle`) so an unused connection stops costing money. `idle_revoke_at` on every read shows when that would happen.

## Invitation limits

The single-account endpoint includes `limits.invites`: `limit` (default 25), `used`, `pending` (queued reservations), `remaining`, and `resets_at` (next midnight UTC). Withdrawn invitations retain their original daily usage. Pending acceptance does not consume another day's allowance. These limits cover OneShot API activity, not browser or external-tool activity.


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