# OpenAPI spec for the Mujib REST API

> The OpenAPI spec of the Mujib REST API describes every request, parameter, field and error. Import it into your API tool or generate a client from it.

The OpenAPI spec of the Mujib REST API describes the five requests, every parameter they take, every field in their responses with its type and whether it can be `null`, and every error, in OpenAPI `3.1`. Download [openapi.json](https://docs.mujib.ai/openapi.json) and import it into the tool you use.

## What does the OpenAPI spec describe?

It describes the whole API as it works today:

- **Server:** `https://api.mujib.ai`, with paths starting at `/api/v1`.
- **Authentication:** two ways, the `Authorization: Bearer mjb_live_…` header or the `X-Api-Key` header.
- **The five requests**, with their ids in the spec (`operationId`):

| `operationId` | Request | Reference |
| --- | --- | --- |
| `getMe` | `GET /api/v1/me` | [Test an API key](https://docs.mujib.ai/en/developers/api-me/) |
| `listContacts` | `GET /api/v1/contacts` | [List contacts](https://docs.mujib.ai/en/developers/api-contacts/) |
| `getContact` | `GET /api/v1/contacts/{id}` | [Get a contact](https://docs.mujib.ai/en/developers/api-contact/) |
| `listBookings` | `GET /api/v1/bookings` | [List bookings](https://docs.mujib.ai/en/developers/api-bookings/) |
| `getBooking` | `GET /api/v1/bookings/{id}` | [Get a booking](https://docs.mujib.ai/en/developers/api-booking/) |

- **Parameters:** each with its type, bounds and default, such as `limit`, `cursor`, `since`, `from`, `to` and `status`.
- **Responses:** each field with its type, the fields that may be `null`, and the possible values of `status`, `stage` and `source`, with made-up examples.
- **Errors:** the shared envelope `{ "error": { "code", "message" } }` and the 400, 401, 403, 404, 429 and 500 responses.
- **Headers:** `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`, `Retry-After` and `Cache-Control`.

## How do I use the spec?

Import it into your tool or generate code from it, so you never type out the API by hand.

1. Download [openapi.json](https://docs.mujib.ai/openapi.json).
2. Import it into the API testing tool you use; the five requests appear ready to send.
3. Put your key in the tool's authentication settings, as `Bearer`, never in the URL.
4. Send `getMe` first to check the key works.

You can also:

- **Generate a client in your language:** any generator that reads OpenAPI `3.1` writes the functions and types for you.
- **Validate responses in your tests:** the spec's schemas forbid undocumented fields, so you notice anything you did not expect.

> **Never put a real key in a shared file**
>
> If your tool saves its settings in a file your team shares, keep the key in an environment variable, not in the file itself.
## Which version does the spec describe?

It describes the first version of the API, whose paths start with `/api/v1`. Its `info.version` field holds the date of the last change in ISO format, the same date as in the [API changelog](https://docs.mujib.ai/en/developers/changelog/); when the date moves, read the changelog to see what is new.

## What does the spec not describe?

It describes only the requests you send to the API.

- [Webhook](https://docs.mujib.ai/en/developers/webhooks/) events that Mujib sends to your URL, and how to verify their signatures, have their own pages.
- The [MCP server](https://docs.mujib.ai/en/developers/mcp/) that connects ChatGPT and Claude to your account has its own page.
- The dashboard's pages and internal requests are not part of the public API, so do not build on them.

## Frequently asked questions

### Is the spec hand-written or generated?

Hand-written to match the API as it works, with every field taken from the code that builds the responses.

### Does the spec describe webhooks too?

No. It describes the requests you send to the API. Webhook events and their signatures have their own pages.

### How do I know the spec changed?

Its info.version field holds the date of the last change, the same date as in the API changelog.

---

Source: https://docs.mujib.ai/en/developers/openapi/ · Last updated: 2026-11-04
