> For the complete documentation index, see [llms.txt](https://docs.insurgrid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.insurgrid.com/guides/environments.md).

# 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

| What                                       | Staging                                   | Production                        |
| ------------------------------------------ | ----------------------------------------- | --------------------------------- |
| 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-sessions
```

is the same call in staging with one word changed:

```
POST https://phoenix-staging.insurgrid.com/api/v1/embed-sessions
```

Paths, 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](/testing/sandbox.md) — registering a staging webhook endpoint and firing test events.
* [Get your API credentials](/get-started/03-api-credentials.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.insurgrid.com/guides/environments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
