API Reference
Health Check
Check if the API is operational
Endpoint
GET /api/healthDescription
Returns the current health status of the API. This endpoint does not require authentication and can be used for monitoring.
Authentication
None required
Request
curl https://betalink.dev/api/healthResponse
Success (200 OK)
{
"status": "ok"
}Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Always "ok" when the service is healthy |
Code Example
import { createBetalinkClient } from "@betalink/api-client";
const client = createBetalinkClient({
baseUrl: "https://betalink.dev/api",
apiKey: "your-api-key",
});
const health = await client.health();
if (health.status === "ok") {
console.log("API is operational");
}Use Cases
- Monitoring: Include in health check systems
- Load balancer: Use for backend health probes
- Startup checks: Verify API availability before processing