Keys, limits and errors
Keys
Create an account; once it’s approved, create a key in the console and send it on every request:
curl -H "Authorization: Bearer ebk_…" https://api.endorsedby.org/v1/elections?upcoming=true
Keep keys on servers, never in a browser or app. A key can be limited to some IP addresses and to some scopes: data:read (the data endpoints), stream:read (the stream) and subscriptions:write.
Rate limits
Each account has a per-minute limit and, on most plans, a daily cap (UTC days), shared by all its keys. Every response says where you are: RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset (seconds), and X-Daily-Limit / X-Daily-Remaining. Over the limit you get 429 with Retry-After. Opening a stream counts as one request; the events on it don’t count.
Errors
{ "error": { "code": "rate_limit_exceeded", "message": "Your plan allows 60 requests a minute.", "request_id": "…" } }Codes include missing_api_key, invalid_api_key, revoked_api_key, account_pending, insufficient_scope, invalid_parameter, not_found, rate_limit_exceeded, daily_limit_exceeded, too_many_streams, cursor_expired and internal_error. Quote the request_id when you write to us.
Pages
Lists return { "data": [...], "next_cursor": "…" }. Pass cursor=<next_cursor> for the next page; null means you have them all. limit sets the page size.