# Navio API for developers

Build on Navio with the API: a quickstart, how a key signs a request, a first read-only call, and the full reference.

- **Customer APIs** (Preview): What a Navio customer can do with their own account. Personal API keys are being built, and no customer operation is published until it has been reviewed, so this API is a preview.
- **Partner and operations APIs** (Available): What a Navio partner or operations team does with an API key: look up service departments, cars, prices and time windows, and manage bookings. Keys are available on request.

## Quickstart

### Customer APIs

> Preview. Personal Navio API keys are not issued yet, so nothing below can be called today. These pages describe the plan. They will state what is live only after the backend that issues keys is deployed.

1. When personal keys ship, create one in your account under **API access**.
2. Keep it in the environment variable `NAVIO_API_KEY`, never in code or a URL. Examples and prompts read the key from there.
3. Make the first read-only call below.
4. Open the **API reference** for the operation you need.

### Partner and operations APIs

1. Ask for a Navio API key (see **Create an API key**). It is shown once.
2. Keep it in the environment variable `NAVIO_API_KEY`, never in code or a URL.
3. Make the first read-only call below.
4. Open the **API reference** for the operation you need.

## Create an API key

### Customer APIs

> Preview. Personal Navio API keys are not issued yet. When available, look for **API access** in the account for the brand you book through.

### Partner and operations APIs

Partner keys are issued by Navio. Write to [admin@naviosolutions.com](mailto:admin@naviosolutions.com) with the name of your company and what you want to build. Self-service creation is not available yet.

The key is shown once, when it is created. A key can only do what the roles Navio grants it allow; a call outside them returns `403 Forbidden`. A key can be revoked at any time.

## Authentication

### Customer APIs

Planned: a personal key is sent the same way as a partner key, as `Authorization: Api-Key <your key>`, and starts with `na_`. Each key holds the roles you choose when you create it, such as `roles/customerApi.accountViewer`, and never more than your own account can do. This is not live yet.

### Partner and operations APIs

Send the key on every request:

```
Authorization: Api-Key <your key>
X-Navio-Source: your-integration-name
```

`X-Navio-Source` names your integration with a stable value, such as your company or app. We use it to trace your requests.

## Your first call

### Customer APIs

The first read-only call will be `GET /v1/accounts/me/settings/`, which reads your own account settings with the `roles/customerApi.accountViewer` role. The backend has not published it yet: it is not in the schema and cannot be called.

Request:

```
GET https://api.noddi.co/v1/accounts/me/settings/
```

### Partner and operations APIs

This call only reads. It lists the service departments of a brand, which gives you the ids later calls need. Replace the brand domain.

curl:

```bash
curl -sS "https://api.noddi.co/v1/service-departments/from-brand-domain/for-partner/?brand_domain=<brand-domain>" \
  -H "Authorization: Api-Key $NAVIO_API_KEY" \
  -H "X-Navio-Source: your-integration-name"
```

A `200` answer is a JSON list. `401` means the key is missing or wrong, `403` that it has no role for `service_department_list_from_brand_domain_for_partner_api`.

## Changing data safely

> A request that uses **POST, PUT, PATCH or DELETE** changes live data, and some of it cannot be undone: a booking, a payment, a canceled visit.

- Start with `GET` requests. Read before you write.
- Before a request that changes data, check the method, the URL and the body.
- Never retry a request that changed data without checking what the first one did.
- This documentation never sends a request for you.

## AI coding assistant setup

**Connect an assistant to Navio without a key.** The Navio MCP server at `https://mcp.bynavio.com/mcp` signs you in through the browser. An API key is not part of it. [Set up the assistant](https://naviosolutions.com/en/mcp).

**Give a coding assistant the API.** Point it at the [OpenAPI file](https://naviosolutions.com/openapi.json) and the [guides as Markdown](https://naviosolutions.com/en/developers.md), or at [llms.txt](https://naviosolutions.com/llms.txt). They are generated from the same source as this page.

### Customer APIs

A copyable prompt for the customer API arrives here when personal keys do. It will read the key from `NAVIO_API_KEY`, make one read-only call, and ask before anything that changes data.

### Partner and operations APIs

Copy this prompt into your coding assistant. It reads the key from the environment variable, makes one read-only call, and asks you before anything that changes data.

Prompt for your coding assistant:

```
You are helping me work with the Navio API for partners and operations. Follow these rules exactly.

Setup
- The API description is https://naviosolutions.com/openapi.json. Read it before you call anything, and call only operations listed there.
- The base URL is https://api.noddi.co. Every request sends the header "Authorization: Api-Key" followed by the key from the environment variable NAVIO_API_KEY, and the header "X-Navio-Source" with the name of my integration.
- If NAVIO_API_KEY is empty, stop and tell me. Do not look for another credential.
- Never print the key, write it to a file, log it or put it in a URL.

First call (read-only)
- Make this call first and show me a short summary: GET https://api.noddi.co/v1/service-departments/from-brand-domain/for-partner/?brand_domain=<brand-domain>
- Ask me for the brand domain if you do not have it.

Changing data
- A request that uses POST, PUT, PATCH or DELETE changes live data. Before you send one, show me the method, the full URL and the body, say what will change, and wait until I answer "yes".
- Ask again for every such request, including a retry.
- Until I say yes, send only GET requests.
```
