Quickstart
Make your first call to the Motorbay API in about five minutes. You need an email address, a terminal with curl, and a plan or a free trial.
1. Create an account
Open Motorbay Console and create an account on the Sign Up tab. Use an email address you can read now.
2. Confirm your email
We send you a link. Open it to confirm your email. You can't create API keys until you do. The console says "Verify your email to create API keys." until then.
3. Choose a plan
Pick a plan on Pricing and choose Choose plan. New customers get a 14-day free trial on every plan except Enterprise. Without an active plan or trial, the API answers 402 with the code PaymentRequired.
4. Create an API key
On the dashboard, choose Create key. Name it after where you'll use it, for example "Production server".
The key is shown once. Copy it now and keep it somewhere safe. We store only a hash, so a lost key can't be recovered. Put it in an environment variable:
export MOTORBAY_API_KEY="mbk_live_…"
5. Make your first call
Send the key in the X-Api-Key header. This lists the first three vehicle kinds:
curl -H "X-Api-Key: $MOTORBAY_API_KEY" \
"https://api.motorbay.app/v1/kinds?pageSize=3"
A 200 looks like this:
{
"data": [
{ "id": "1", "name": "Personbil", "originalName": "Personbil" },
{ "id": "2", "name": "Stor personbil", "originalName": "Stor personbil" },
{ "id": "3", "name": "Varebil", "originalName": "Varebil" }
],
"metadata": { "page": 1, "pageSize": 3, "totalCount": 15, "totalPages": 5 }
}
6. Look up a vehicle
Look up a vehicle by registration number:
curl -H "X-Api-Key: $MOTORBAY_API_KEY" \
"https://api.motorbay.app/v1/vehicles/plate/AB12345"
You get the vehicle as JSON, or a 404 with the code VehicleNotFound if no vehicle has that registration number. AB12345 is a sample. Use a plate you know.
If something goes wrong
401withApiKeyMissing: theX-Api-Keyheader is missing. Check that the variable is set withecho $MOTORBAY_API_KEY.401withApiKeyInvalid: the key is wrong, deleted, or expired. Create a new one.402withPaymentRequired: choose a plan, or check that your trial hasn't ended.429withRateLimitExceeded: you sent more than 60 requests in a minute. Wait the seconds in theRetry-Afterheader.
Next
- Authentication and API keys
- Errors
- API reference, with every endpoint and field