Skip to content

OpenAPI spec for the Mujib REST API

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 and import it into the tool you use.

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):
operationIdRequestReference
getMeGET /api/v1/meTest an API key
listContactsGET /api/v1/contactsList contacts
getContactGET /api/v1/contacts/{id}Get a contact
listBookingsGET /api/v1/bookingsList bookings
getBookingGET /api/v1/bookings/{id}Get a 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.

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

  1. Download 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.

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; when the date moves, read the changelog to see what is new.

It describes only the requests you send to the API.

  • Webhook events that Mujib sends to your URL, and how to verify their signatures, have their own pages.
  • The MCP server 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.