856856

API Tokens

The Mothership API uses tokens to authenticate requests. To obtain an API token, click the "get API keys" link at the top of this page and fill out the provided form. A member of our support team will be in touch shortly to provide you with access tokens for your organization and assist with onboarding.

If you have already filled out that form but require a new API token, email [email protected] to request a new one.

🚧

API tokens act as passwords for the Mothership API and should be stored securely.

Authorization Header

To authenticate a request, include your API token as a Bearer token in the request's Authorization header.

curl -X "GET" "https://api.mothership.com/beta/shipments/MTHRSP" -H "Authorization: Bearer {YOUR_API_TOKEN}" -H "Content-Type: application/json"

Unauthenticated requests will fail with a 401 response code.

{
    "code": 401,
    "type": "UNAUTHENTICATED",
    "message": "Your authentication token is invalid"
}