API ReferenceGuidesChangelog

Authentication

Authenticate Sentio REST API requests with an API key.

Every request to the Sentio API at https://api.sentio.xyz is authenticated with an API key.

Get an API key

There are two kinds of API keys:

  • Personal keys act as your own account. Create one on the API keys page of your profile.
  • Organization keys act on behalf of an organization, for example in shared services or CI that shouldn't depend on one member's account. Create one on the organization's API keys page, https://app.sentio.xyz/organizations/<org>/apikeys.

Both kinds are sent the same way. See API Key for a walkthrough.

Send the key

Pass the key in the api-key request header:

curl -X POST 'https://api.sentio.xyz/v1/analytics/<owner>/<slug>/sql/execute' \
  -H 'api-key: <your api key>' \
  -H 'Content-Type: application/json' \
  -d '{"sqlQuery": {"sql": "SELECT count(*) FROM `Transfer`"}}'

If you cannot set headers, pass it as the api-key query parameter instead:

curl 'https://api.sentio.xyz/v1/dashboards?ownerName=<owner>&slug=<slug>&api-key=<your api key>'

Prefer the header: query strings tend to end up in logs and browser history.

An API key acts with the permissions of the account or organization it belongs to. Keep it secret, and never commit it or ship it in client-side code.

On this page