Authentication
All API requests require an API key passed via the X-API-Key header.
API Key Format
Parley API keys are prefixed with prl_ followed by a 32-character alphanumeric string.
prl_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6Sending your API key
Include the key in the X-API-Key header on every request:
curl "https://api.parley.dev/v1/facilities?state=CA" \ -H "X-API-Key: prl_YOUR_KEY_HERE"Security note: Never expose your API key in client-side code. Keep it in environment variables or server-side configuration only.
Rate Limits
Rate limits are enforced per account on a daily basis. Limits reset at midnight UTC.
| Tier | Daily Limit | Overage |
|---|---|---|
| Free | 100 requests/day | Hard limit |
| Pro | 25,000 requests/day | $0.003/request |
Rate Limit Headers
Every response includes headers indicating your current usage:
X-RateLimit-Limit: 25000X-RateLimit-Remaining: 23753X-RateLimit-Reset: 2026-03-21T00:00:00ZCheck your usage
Use the account usage endpoint to check your current consumption:
curl "https://api.parley.dev/v1/account/usage" \ -H "X-API-Key: prl_YOUR_KEY_HERE"{ "data": { "tier": "pro", "daily_limit": 25000, "today": { "request_count": 1247, "remaining": 23753, "resets_at": "2026-03-21T00:00:00Z" }, "billing_period": { "start": "2026-03-01", "end": "2026-03-31", "total_requests": 28419, "included_requests": 150000, "overage_requests": 0 } }}Authentication Errors
Missing or invalid API key
{ "error": { "code": "UNAUTHORIZED", "message": "Missing or invalid API key. Include a valid key in the X-API-Key header." }}Rate limit exceeded
{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "You have exceeded your daily rate limit of 5000 requests.", "details": { "limit": 5000, "remaining": 0, "resets_at": "2026-03-21T00:00:00Z" } }}Unauthenticated Endpoints
The following health check endpoints do not require authentication:
| Parameter | Type | Description |
|---|---|---|
GET /healthz | endpoint | Returns 200 if the API server is running |
GET /readyz | endpoint | Returns 200 if the API can connect to PostgreSQL and Redis |
GET /healthzendpointReturns 200 if the API server is running
GET /readyzendpointReturns 200 if the API can connect to PostgreSQL and Redis