Every request carries your API key in a header:
There is no OAuth flow, no token exchange and no expiry. The key is a long-lived secret — treat it like a password and keep it out of source control.

What the key determines

Your key is bound to a single group. That binding decides:
  • Which pharmacies you can act for. Naming an NPI outside your group is rejected.
  • Which environment you’re in. Keys don’t cross between sandbox and production.
To see exactly what a key can reach, call GET /api/v1/pharmacies/search. It takes no parameters and returns the group’s pharmacies.

Failure responses

The header was absent or the key wasn’t recognised.
Most often the pharmacy NPI you named isn’t in your group.It also covers a key that is well-formed but belongs to no group at all. That distinction started to matter in the 1 September release: GET /api/v1/ndc-transaction-statistic previously accepted any value shaped like a GUID, because the endpoint has no pharmacy to scope the key against and so never resolved it. It now resolves the key and returns 403 when nothing owns it. A real key is unaffected; a placeholder that appeared to work will stop.
Request validation runs before authentication. A request that is both malformed and unauthenticated returns 400 with field-level validation errors, not 401:
Fix the body first. If a well-formed request then returns 401, the problem is the key.

Rotating a key

Email info@instockrx.com. If you believe a key has been exposed, say so in the subject line and we’ll prioritise it.
v1 has no key-scoping — a key can do everything the API offers for every pharmacy in its group. Scoped keys, which restrict a credential to specific operations, arrive with v2.