Authentication
How to authenticate with the JDay API using Bearer tokens.
All JDay API endpoints require authentication via API key.
Header Format
Send your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYAPI keys are opaque and case-sensitive. All requests must use HTTPS.
Example Request
curl -X GET "https://jday-api.jday.workers.dev/v1/is-business-day?date=2026-04-03&country=ZA" \
-H "Authorization: Bearer jday_live_xxx" \
-H "Accept: application/json"Authentication Failures
All of the following return 401 unauthorized with the same response shape:
- Missing bearer token
- Wrong auth scheme
- Unknown key
- Revoked key
- Disabled key
- Expired key
- Structurally invalid key
{
"error": {
"code": "unauthorized",
"message": "Valid API authentication is required."
},
"request_id": "018f7d1a-3a51-7f4b-9c78-830f8b6ce220"
}The 401 response always includes:
WWW-Authenticate: Bearer realm="JDay"The API will never leak whether a specific key previously existed. All invalid credentials return the same status and message.
Request Tracing
Every response includes an X-Request-Id header containing a server-generated UUIDv7:
X-Request-Id: 018f7d1a-3a51-7f4b-9c78-830f8b6ce220You can optionally send X-Client-Request-Id for your own trace correlation. JDay echoes it back only if it is 1–128 printable ASCII characters with no control characters. Invalid values are silently ignored.
request_id is for debugging and support — it has no billing semantics.