API referenceGetting started
Overview
Quote, purchase and track Mothership shipments from your own software over a REST API.
Mothership API
Mothership provides a RESTful API that enables third-party developers to quote, purchase, and track shipments for their respective Mothership shipping accounts.
The API responds with JSON-encoded data and standard response codes. Webhooks are available to provide real-time status updates for shipments.
Accessing the API
Organization owners create sandbox and production API tokens on the API settings page in the dashboard. See Authentication for how to send them.
Environments
There are two environments available to developers. Both serve the same /beta API, so moving to production means changing the base URL and the token.
| Environment | Base URL | Description |
|---|---|---|
| Sandbox | https://sandbox.api.mothership.com/beta | A safe environment to test endpoints without purchasing a shipment. Requests are validated exactly as in production, and responses have the same fields, but the data is sample data. |
| Production | https://api.mothership.com/beta | Quotes are real, purchases book real shipments, and your organization's payment method is charged. |
How the sandbox behaves
- A request the sandbox accepts is accepted in production, and a request it rejects fails in production with the same error message.
- Responses have the same fields as production. Values are fixed sample data, so every shipment you create in the sandbox is
MS00000000. - Quotes echo the freight and locations you send. Nothing is stored, so a shipment response carries sample freight rather than the freight from your quote.
- You can create, update and remove webhook configurations, but the sandbox does not store them or deliver webhooks. Test webhook delivery in production.
- Rate limits match production, but sandbox requests are counted separately and never use up your production limits.
OpenAPI specification
An OpenAPI v3 specification for Mothership's API can be downloaded for use in auto-generation of client code. This site serves the same document at /openapi.json, and every page in this reference is built from it.
Using these docs with AI tools
/llms.txt lists every page for language models and coding agents. Add .md to any page's URL, such as /reference/createquote.md, to get that page as Markdown, or use Copy page at the top of the page.
Support
If you run into any issues or have any questions while using the Mothership API, please send an email to developers@mothership.com.