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

# Health

## Worked health samples

The endpoint list below documents every operation's parameters; this
overlay walks the health ping the way a deployment checker actually uses
it: **read `/api/health` for the unversioned liveness probe → read
`/api/v1/health` for the versioned probe with the same envelope**. Success
envelopes are `{ data, meta }` — the four-shape round-trip is documented
in [How to read a worked sample](/guides/using-orbit-samples). The
unversioned probe exists so a container-orchestrator health check does
not need the API version; the versioned probe is what tenant clients
should hit.

Every response carries `meta.request_id`. Quote the request id when a
liveness flapping and the versioned probe both return 2xx — support can
correlate them to the process start time from the request id.

### 1. Unversioned liveness probe

`GET /api/health` returns the origin's alive signal — a container
orchestrator pings this without any tenant scope, so it ignores the
`X-API-Key` and always resolves in milliseconds. Do not treat it as a
tenant check — a wrong API key does not error the liveness probe.

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.orbit.devotel.io/api/health" \
    -H "X-API-Key: dv_test_sk_YOUR_KEY"
  ```

  ```typescript Node.js theme={null}
  const res = await fetch("https://api.orbit.devotel.io/api/health", {
    headers: { "X-API-Key": process.env.ORBIT_API_KEY! },
  });
  console.log(await res.json());
  ```
</CodeGroup>

```json 200 theme={null}
{
  "data": {
    "ok": true
  },
  "meta": {
    "request_id": "req_hlt_probe",
    "timestamp": "2026-08-26T12:00:00.000Z"
  }
}
```

### 2. Versioned health probe

`GET /api/v1/health` returns the tenant-scoped health read — the versioned
path honours the tenant's auth, so a bad API key errors your operator
check before it reaches the container. Use this for dashboards and
preflight.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.orbit.devotel.io/api/v1/health" \
    -H "X-API-Key: dv_test_sk_YOUR_KEY"
  ```

  ```typescript Node.js theme={null}
  const res = await fetch("https://api.orbit.devotel.io/api/v1/health", {
    headers: { "X-API-Key": process.env.ORBIT_API_KEY! },
  });
  console.log(await res.json());
  ```
</CodeGroup>

```json 200 theme={null}
{
  "data": {
    "ok": true
  },
  "meta": {
    "request_id": "req_hlt_v1",
    "timestamp": "2026-08-26T12:00:01.000Z"
  }
}
```

### 3. Errors

Errors follow the `{ error, meta }` envelope. The failure every operator
hits:

**401 — invalid or revoked key.** On the versioned probe the API key
gates entry; the unversioned probe never errors, so a 401 here confirms
the credential itself.

```json 401 theme={null}
{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "The provided API key is invalid or has been revoked.",
    "status": 401
  },
  "meta": {
    "request_id": "req_hlt_err",
    "timestamp": "2026-08-26T12:00:02.000Z"
  }
}
```
