Authentication
Copy page
How to send an API key, which scopes a key can hold and who can get one during the beta.
Send your API key in the Authorization header as a bearer token; never put a key in a URL.
curl https://api.askkelly.ai/v1/wire/tickets \
-X POST \
-H "Authorization: Bearer $KELLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Samples on these pages read the key from the KELLY_API_KEY environment variable, so a sample runs when pasted and your key never sits in a file you share.
Getting a keyLink to this section
During the beta, keys go to Kelly staff only: an account needs a staff address to sign in, and keys are made on the account page. Nothing is charged during the beta. Some operations need no key, so anyone can call them: GET /health, GET /v1/reference and GET /v1/reference/{topic_id} (see what answers today).
Live and test keysLink to this section
A key starts with kelly_live_ for live data or kelly_test_ for test mode. Test keys draw on their own allowance and reach only the sandbox; see the test mode policy.
Key scopesLink to this section
Each key holds one or more key scopes. An operation that needs a scope the key lacks answers 403 with the code insufficient_scope, and the problem's param names the scope.
| Scope | Plans whose keys can hold it |
|---|---|
read:odds | Free, Pro, Developer, Scale |
read:players | Free, Pro, Developer, Scale |
read:reference | Free, Pro, Developer, Scale |
run:answers | Free, Pro, Developer, Scale |
wire:connect | Free, Pro, Developer, Scale |
read:league | Pro |
read:tracker | Pro |
run:simulation | Pro |
A key in a URLLink to this section
A key or token sent in a URL is refused with credential_in_url, because logs and browser history keep URLs. Rotate a key that was sent this way: treat it as exposed.