> 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/get-started/03-api-credentials.md).

# Get your API credentials

InsurGrid uses two kinds of secret, for two different jobs. Keep them straight from the start.

## API keys — for calling the InsurGrid API

You create API keys in the **API Keys** area of your dashboard, and send one as a bearer header on every request to `https://api.insurgrid.com/v2`:

```
Authorization: Bearer <your-api-key>
```

* **Sandbox keys are prefixed `ig_test_`** and only work against sandbox data; production keys work against live data.
* **Shown once, at creation** — copy the key immediately into a secrets manager or environment variable. If you lose it, **Roll** it (rotate) and update your app.
* **Name your keys** (e.g. "CI pipeline") so you can tell them apart, and **Revoke** any key instantly if it leaks.

![The API Keys area — create, name, roll, and revoke keys. Secret keys are shown only once, at creation.](https://3825213797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjBgAFiZ99Eug1CmRq2QO%2Fuploads%2Ft7tfGrSjwmA8afmlQrgU%2Fapi-keys.png?alt=media)

> **New term — bearer token:** a secret string sent as `Authorization: Bearer <key>` that authenticates an API call — whoever holds it can call the API as you. Treat it like a password: never put it in front-end code, a public repo, or a URL.

## Signing secrets — for verifying webhooks InsurGrid sends you

Separately, **each webhook endpoint has its own signing secret.** InsurGrid signs every delivery with it, and you use it to verify the `x-signature` header so you know a `POST` genuinely came from InsurGrid.

* You get an endpoint's signing secret **when you register the endpoint** (see [Set up a webhook endpoint](/get-started/04-webhook-endpoint.md)).
* It **stays on your server** — you never send it back to InsurGrid.
* How to use it, step by step: [Verify a webhook signature](/guides/signing-verification.md).

## Keep them safe

* Store keys and signing secrets in environment variables or a secrets manager — never hard-code them.
* Never expose either in browser or front-end code.
* Use your **sandbox** keys and staging endpoints while building; switch to **production** keys and endpoints only when you go live.

Next: [Set up a webhook endpoint →](/get-started/04-webhook-endpoint.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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.insurgrid.com/get-started/03-api-credentials.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
