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.
What does the OpenAPI spec describe?
Section titled “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 theX-Api-Keyheader. - The five requests, with their ids in the spec (
operationId):
operationId | Request | Reference |
|---|---|---|
getMe | GET /api/v1/me | Test an API key |
listContacts | GET /api/v1/contacts | List contacts |
getContact | GET /api/v1/contacts/{id} | Get a contact |
listBookings | GET /api/v1/bookings | List bookings |
getBooking | GET /api/v1/bookings/{id} | Get a booking |
- Parameters: each with its type, bounds and default, such as
limit,cursor,since,from,toandstatus. - Responses: each field with its type, the fields that may be
null, and the possible values ofstatus,stageandsource, 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-AfterandCache-Control.
How do I use the spec?
Section titled “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.
- Download openapi.json.
- Import it into the API testing tool you use; the five requests appear ready to send.
- Put your key in the tool’s authentication settings, as
Bearer, never in the URL. - Send
getMefirst to check the key works.
You can also:
- Generate a client in your language: any generator that reads OpenAPI
3.1writes 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.
Which version does the spec describe?
Section titled “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; when the date moves, read the changelog to see what is new.
What does the spec not describe?
Section titled “What does the spec not describe?”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.