> For the complete documentation index, see [llms.txt](https://dispatch-2.gitbook.io/integrate-with-dispatch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dispatch-2.gitbook.io/integrate-with-dispatch/readme.md). Agents can also search and read this documentation through its [MCP server](https://dispatch-2.gitbook.io/integrate-with-dispatch/~gitbook/mcp).

# Integrate with Dispatch

Connect your store, warehouse, or operations system to Dispatch using **API keys** and **webhooks**.

This documentation is for **developers building on behalf of a merchant**—not for Dispatch internal teams.

## What you can build

* **Create and manage shipments** from your backend (no manual dashboard work per order).
* **List and track shipments** by code or filters.
* **Receive real-time updates** when shipment status changes (assigned, in transit, delivered, cancelled, and more).

## Staging environment

Use these URLs while building and testing your integration:

| Purpose                                     | URL                                            |
| ------------------------------------------- | ---------------------------------------------- |
| Merchant Dashboard (create keys & webhooks) | <https://merchants.staging.dispattch.dev>      |
| API base URL                                | <https://service.staging.dispattch.dev/api/v1> |

Production API URLs are provided by your Dispatch account team when you go live.

## Quick start (about 15 minutes)

1. [Getting Started](https://dispatch-2.gitbook.io/integrate-with-dispatch/getting-started.md) — log in, create a key, make your first API call, register a webhook.
2. [API Keys](https://dispatch-2.gitbook.io/integrate-with-dispatch/authentication-api-keys.md) — create, store, and use keys in your code.
3. [Webhooks](https://dispatch-2.gitbook.io/integrate-with-dispatch/webhooks.md) — register your URL, verify signatures, handle shipment updates.
4. [Reference](https://dispatch-2.gitbook.io/integrate-with-dispatch/reference.md) — endpoints, statuses, headers, errors, FAQ.
5. [Integration Checklist](https://dispatch-2.gitbook.io/integrate-with-dispatch/integration-checklist.md) — verify your system before production.

## How authentication works

| Task                                         | What you use                                         |
| -------------------------------------------- | ---------------------------------------------------- |
| Create or delete API keys, register webhooks | Log in to the **Merchant Dashboard**                 |
| Automate shipments from **your server**      | **API key** in the `X-API-KEY` header                |
| Receive status updates on **your server**    | **Webhook** URL + **signing key** to verify requests |

Never put API keys or signing keys in frontend code, mobile apps, or public repositories.


---

# 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://dispatch-2.gitbook.io/integrate-with-dispatch/readme.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.
