> ## Documentation Index
> Fetch the complete documentation index at: https://blackswan-23965643.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /health — BlackSwan API Health Check Endpoint

> GET /health — Returns API availability status and a Unix timestamp. Use this endpoint to verify the BlackSwan REST API is online and reachable.

This endpoint verifies that the BlackSwan API is online and reachable. It returns a simple status string and a Unix timestamp so you can confirm both availability and server-side time. No authentication or parameters are required — making it ideal for lightweight uptime checks and pre-flight validation.

## Endpoint

```
GET https://api.blackswanfinance.xyz/health
```

## Request Example

```bash theme={null}
curl https://api.blackswanfinance.xyz/health
```

## Response — 200 OK

```json theme={null}
{
  "status": "ok",
  "timestamp": 1704067200
}
```

<ResponseField name="status" type="string">
  Indicates the current availability of the API. Returns `"ok"` when the service is healthy and accepting requests.
</ResponseField>

<ResponseField name="timestamp" type="number">
  The server-side Unix timestamp (seconds since epoch) at the time the health check was processed. You can use this to verify time synchronization between your system and the BlackSwan API.
</ResponseField>

<Tip>
  Integrate this endpoint into your uptime monitoring pipeline (e.g. Datadog, Better Uptime, or a simple cron job) to get alerted the moment the BlackSwan API becomes unreachable. It's also good practice to call `/health` before issuing a batch of credit queries — if it returns anything other than `"status": "ok"`, hold off on downstream requests until the service recovers.
</Tip>

## Error Codes

| Status Code | Meaning                                                                           |
| ----------- | --------------------------------------------------------------------------------- |
| `500`       | Server error — the API is reachable but encountered an unexpected internal error. |
