Environments
Staging and production run the same API at different addresses.
There are two InsurGrid environments. They run the same code and accept the same requests — only the addresses and the credentials differ. Build against staging, prove it works, then change the host and the key.
Addresses
API — everything under /api/v1
https://phoenix-staging.insurgrid.com
https://phoenix.insurgrid.com
Embed script — embed.js in your snippet
https://dashboard-staging.insurgrid.com
https://dashboard.insurgrid.com
Dashboard — where you create API keys
https://dashboard-staging.insurgrid.com
https://dashboard.insurgrid.com
Forms people fill in — the shareUrl host
https://link-staging.insurgrid.com
https://link.insurgrid.com
So a call that reads
POST https://phoenix.insurgrid.com/api/v1/embed-sessionsis the same call in staging with one word changed:
POST https://phoenix-staging.insurgrid.com/api/v1/embed-sessionsPaths, request bodies, response shapes and error codes are identical. Nothing in your code needs to change between the two beyond the host it points at and the key it sends — which is the point of having them.
Keys don't cross over
A staging API key works only against staging, and a production key only against production. The same goes for webhook signing secrets: a staging secret will never validate a production event.
If you're getting 401 and the address looks right, check you aren't holding the other environment's key.
So does shareUrl
A form's shareUrl is built for the environment you fetched it from — ask staging and you get a link-staging.insurgrid.com address. Use the value as given rather than rewriting the host by hand, and fetch the form from the environment you actually mean to use.
Staging data is real, but disposable
Staging has its own database. Anything you create there is a genuine staging record: safe to break and re-create, never billed, and no real customer is ever contacted. A form created on staging does not exist on production.
Related
Sandbox & testing — registering a staging webhook endpoint and firing test events.
