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.
The key is good, but it isn’t allowed to do this — most often because the pharmacy NPI you named isn’t in your group.
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.