Authentication
Send your API key in a header, keep it on your server, and replace a credential.
Send the key in a header
Every /v1 read needs an API key. Send it in an X-API-Key: <key> header or as Authorization: Bearer <key> on HTTPS requests. Keep the full value in your server environment. Your browser or mobile app can ask your own service for the fields it displays.
Name each key after the job that uses it. A request log with keys called “Schedule importer” and “Public scoreboard” is easier to investigate when one of those jobs starts making extra requests.
Recognize a key
Issued keys begin with psd_live_. The prefix and the last four characters identify a key in logs and support requests. The complete value authorizes requests and appears only once, when the key is issued. The service stores a digest, not the key itself. Keys generated in the browser preview are sample credentials.
Replace a deployed key
Issue a replacement key, store it in the application's secret manager, redeploy each caller, and confirm that traffic has moved. Then ask for the old key to be revoked. For a suspected disclosure, revoke the affected key first and provision the replacement separately. Manage API keys
curl --request GET "https://api.precisedata.io/v1/events?competition=nba&status=in_progress" \
--header "Authorization: Bearer $PRECISEDATA_KEY"