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

# Force a Line Health Check

> Trigger a fresh server ping and iMessage availability probe on one line, using that workspace's API key.

<Note>
  [`/api/lines/by-user`](/api-reference/endpoint/get-lines) reports the **last**
  health check. This triggers a **new** one — use it when a line looks unhealthy
  and you want to know whether it still is.
</Note>

## Endpoint

* **Method**: `GET`
* **Path**: `/api/lines/check-availability?id={lineId}`
* **Auth**: `Authorization: Bearer tuco_xxxxxxxxxxxxx` (workspace key)

```bash theme={null}
curl "https://app.tuco.ai/api/lines/check-availability?id=6a3d7d7ef8c81f91304ed6f1" \
  -H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
```

The probe pings the line's server and checks iMessage availability, then writes
the result to the line's `healthCheck`, so a following `/api/lines/by-user` shows
the fresh state.

Only lines in the workspace the key belongs to can be checked. An
[agency key](/api-reference/agency-api-keys) is refused — pick the client's own
key, since "which line" is a per-workspace question.

## Error responses

| Status | When |
| - | - |
| `400` | `id` missing, or the line has no server configuration to probe |
| `401` | Missing or invalid key |
| `403` | An agency key (`tucoagency_…`) was used |
| `404` | No such line in this workspace |


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