API Reference
Authentication
Every request to the eligibility.dev API requires two headers: a workspace API key and a clinic client ID.
Required headers
| Header | Value | Description |
|---|---|---|
| Authorization | Bearer <api_key> | Your workspace API key. Generated in Account → API keys. |
| X-Client-Id | <uuid> | The UUID of the clinic (client) record making the request. |
Example
curl -X POST https://eligibility.dev/api/eligibility/check \
-H "Authorization: Bearer sk_live_your_workspace_api_key" \
-H "X-Client-Id: 7f3a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c" \
-H "Content-Type: application/json" \
-d '{ ... }'Auth errors
| Code | HTTP | Cause |
|---|---|---|
| UNAUTHORIZED | 401 | Missing or invalid Bearer token |
| CLIENT_ID_REQUIRED | 400 | X-Client-Id header is missing |
| CLIENT_ID_INVALID | 400 | X-Client-Id is not a valid UUID |
| CLIENT_NOT_FOUND | 404 | No clinic record for this UUID |
| CLIENT_INACTIVE | 404 | Clinic exists but is deactivated |
| WORKSPACE_MISMATCH | 409 | Client belongs to a different workspace than the API key |
See the full error codes reference for all possible codes.