Two kinds of credential
Send an API key only in
x-api-key. An API key sent as Authorization: Bearer returns 401 Unauthorized, and sending both headers together is rejected.
How API keys are scoped
An API key acts as the person who created it, so it can never do more than their own account. When you create a key you also choose:- Scopes, which decide the endpoints it can call. You can only pick scopes your account holds.
- Sites, which limit the data it can see to the sites you select.
Site and user management, LOAs, bill validation and supplier integration endpoints need a signed-in session and do not accept API keys. API key management always needs a signed-in session.
Keys do not expire unless you set a lifetime when creating them. Revoke a key to stop it working immediately.