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_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6

Sending your API key

Include the key in the X-API-Key header on every request:

Shell
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.

TierDaily LimitOverage
Free100 requests/dayHard limit
Pro25,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:00Z

Check your usage

Use the account usage endpoint to check your current consumption:

Shell
curl "https://api.parley.dev/v1/account/usage" \  -H "X-API-Key: prl_YOUR_KEY_HERE"
200OKapplication/json
{  "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

401Unauthorizedapplication/json
{  "error": {    "code": "UNAUTHORIZED",    "message": "Missing or invalid API key. Include a valid key in the X-API-Key header."  }}

Rate limit exceeded

429Too Many Requestsapplication/json
{  "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:

GET /healthzendpoint

Returns 200 if the API server is running

GET /readyzendpoint

Returns 200 if the API can connect to PostgreSQL and Redis