# Stale integrated accounts

> Source: https://truto.one/docs/guides/integrated-accounts/stale-accounts/

An integrated account that has been `needs_reauth`, with no change, for 7 days is **stale**. Truto pauses it: it stops calling the provider for the account until the account is reconnected. Accounts in any other status are not affected.

:::callout{type="info"}
Truto starts pausing stale accounts on December 1, 2026. Accounts that are already stale that day are paused over its first few hours, so expect a burst of `integrated_account:stale` webhooks then. Stale accounts are not deleted yet: see [Deletion](#deletion).
:::

:::skip-reading{cli="truto accounts list --stale true -o json" skill="truto"}
:::

## When an account goes stale

An account moves to `needs_reauth` when Truto can no longer use its credentials (see [Getting notified about reauthorization](/docs/guides/integrated-accounts/reauthorizing-connections#getting-notified-about-reauthorization)). Every hour, Truto marks the accounts that have stayed `needs_reauth`, with no change, for 7 days as stale.

Stale is not a status. The account keeps `status: needs_reauth` and gains `stale_since`, the time Truto found it stale. Pausing does not delete the account: it keeps its ID, settings and sync job cron triggers, so reconnecting it brings everything back.

## What stops

- **API calls.** Unified, Proxy and Custom API calls and batch requests for the account get a `401` without reaching the provider. On the account's MCP server, listing tools still works, and a tool call returns a result with `isError: true` and the same message as its text.
- **Background work.** The account's token refreshes and [scheduled actions](/docs/guides/integrations/configuration-reference#when-actions-run) pause.
- **Scheduled sync job runs.** When every account a cron trigger's run would call is stale, the run ends **Failed** as soon as it is due, without calling the provider. Its `sync_job_run:failed` event carries a `401` error with `truto_error_code: integrated_account_needs_reauth` and says the account is paused. No `sync_job_run:created` or `sync_job_run:started` event comes before it, since the run never starts. The trigger keeps its schedule, so its runs start again once the account is reconnected.

A sync job run you start yourself starts as usual: on runtime versions 3 and 4 it [ends failed](/docs/guides/sync-jobs/overview#sync-job-runs) when every account it calls needs reauthentication.

A refused API call gets this response:

```json
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Integrated account 6a3f2c1e-8d4b-4f0a-9c61-2b7e5d9a1f30 is stale: it has needed reauthentication since at least 2026-11-24T09:07:12.000Z, so Truto has stopped calling salesforce for it. Reconnect it to resume.",
  "truto_is_remote_error": true,
  "truto_error_code": "integrated_account_needs_reauth",
  "integrated_account_id": "6a3f2c1e-8d4b-4f0a-9c61-2b7e5d9a1f30",
  "stale_since": "2026-12-01T09:07:12.000Z"
}
```

Retrying does not help. `truto_is_remote_error` is `true`, as on the provider's own `401`, so code that treats that `401` as "reconnect needed" handles this one too. There is no `raw_response`, since the provider was not called. Truto does not change the account or send a webhook for these refusals, and they do not count as API calls. See [Errors](/docs/api-reference/overview/errors#refusals--truto_error_code).

## How you find out

- **Webhook.** An [`integrated_account:stale`](/docs/guides/webhooks/list-webhook-events) event for each account as it goes stale. The payload is the integrated account, with `stale_since`.
- **Notifications.** A Slack message or email to each [notification destination](/docs/guides/observability/notifications) subscribed to **Integrated account events** (`integrated_account_events`) or **All events**. It lists the environment's newly stale accounts, up to 100, and links to the environment's account list filtered to stale accounts. An environment gets at most one such message a day: accounts that go stale after it are listed in the next one.
- **Dashboard.** A stale account shows a **Stale** badge beside its status. To list only stale accounts, pick **Stale** in the **Status** filter of the integrated accounts list.
- **API.** `GET /integrated-account/{id}` and `GET /integrated-account` include `stale_since` on stale accounts, unless the list is narrowed with `select`. `GET /integrated-account?stale=true` lists only stale accounts.

:::code-tabs

```bash label="cURL"
curl 'https://api.truto.one/integrated-account?stale=true' \
  -H 'Authorization: Bearer <API token>'
```

```bash label="CLI"
truto accounts list --stale true
```

:::

## Resume a stale account

Reconnect the account [in the dashboard](/docs/guides/integrated-accounts/reauthorizing-connections#reauthorize-connections-via-truto-interface), or with a link token that carries its `integrated_account_id`, so the same account comes back with its ID, settings and sync job cron triggers:

:::code-tabs

```bash label="cURL"
curl -X POST https://api.truto.one/link-token \
  -H 'Authorization: Bearer <API token>' \
  -H 'Content-Type: application/json' \
  -d '{ "integrated_account_id": "<integrated_account_id>" }'
```

```bash label="CLI"
truto link-tokens create --integrated-account-id <integrated_account_id>
```

:::

Open `https://app.truto.one/connect-account?link_token=<link_token>` and complete the connection, or send the link to your customer to complete.

Two other changes also end the pause: updating the account's credentials or `context`, and setting its `status` back to `active` with `PATCH /integrated-account/{id}` when the problem was fixed at the provider. After any of these, calls and scheduled sync runs go through again within about two minutes. Any other change to the account ends the pause at the next hourly check. Either way, the 7 days start again from the change.

## Deletion

Truto does not delete stale accounts yet, and will tell you before it starts. Once deletion is on, a stale account is deleted 30 days after it went stale. Before that, Truto reminds you twice, at least 15 days and at least 7 days before the deletion, by email to every admin on your team and in a message to notification destinations subscribed to **Integrated account events**. No account is deleted before both reminders. Reconnecting the account cancels its deletion, and you can also keep a stale account for another 30 days. When Truto deletes an account, it sends `integrated_account:deleted`.

## Next

[Reauthorizing connections](/docs/guides/integrated-accounts/reauthorizing-connections) covers reconnecting in more detail, including how to keep the account's existing variables. The [webhook event types](/docs/guides/webhooks/list-webhook-events) and [Notifications](/docs/guides/observability/notifications) pages list the other events you can subscribe to.
