# API basics

> Base URL, keys and scopes, ids, errors and pagination: what every endpoint shares.

## Base URL and keys

Every REMI API lives under `https://api.remi.robot.com/api/v3`. Send your key on every call:

```http
Authorization: Bearer live_sk_...
```

Robot.com issues keys. A key belongs to one namespace (your partner), and everything you create or read is scoped to it. Each key has scopes:

| Scope | Opens |
| --- | --- |
| `delivery` | [Delivery API](https://docs.remi.robot.com/delivery/reference), with partner, locations, points and bots |
| `fleet` | [Fleet API](https://docs.remi.robot.com/fleets/reference) |
| `engine` | [Engine API](https://docs.remi.robot.com/engine/reference) |

## Errors

Errors are [RFC 7807](https://www.rfc-editor.org/rfc/rfc7807) `application/problem+json`:

```json
{
  "type": "about:blank",
  "title": "Conflict",
  "status": 409,
  "detail": "Delivery ES-5867 is already finalized",
  "code": "DELIVERY_FINALIZED",
  "instance": "/api/v3/delivery/ES-5867/route"
}
```

- Branch on `status` and `code`. `detail` is for people and can change.
- `params`, when present, holds the values behind the error.
- A missing or unknown key is a plain `401` with `{ "message": "Unauthorized" }`. A key without the scope is a `403`.
- Every endpoint in the references lists its errors and codes.

## IDs

- Deliveries and jobs: like `ES-5867`. Treat them as opaque strings.
- Partners, locations and points: 21 letters and digits, like `V1StGXR8Z5jdHi6BmyT2q`.
- `external_id` is yours. In a delivery URL, add `?id_type=external` to use it instead of ours.

## Times

ISO 8601 in UTC, like `2026-06-17T15:42:00.000Z`. Durations are in milliseconds and distances in meters. A few bot fields are epoch milliseconds: their type in the reference says `number`.

## Pagination

Lists that grow take a cursor. Pass the `next_cursor` of one page to get the next; it is null on the last page. The exact parameters are in each list endpoint.

## Changes

The major version is in the path (`/api/v3`). Responses can gain new fields: ignore the ones you do not use.
