Public API Overview
The Mojeeb Public API lets your backend (CRM, automation, custom app or AI assistant) work with the agents you've already configured in Mojeeb. It uses long-lived API keys, accepts JSON, and returns Stripe-style error envelopes — designed for predictable server-to-server integration.
What can I do with the public API?
- Your key and agents. Check which key you hold and list the agents it can act on, the first two calls of any integration. See Your Key and Agents.
- Agent settings. Read and change an agent's name, description, Main Instructions, time zone, AI handoff and comment auto-hide. See Agent Settings.
- WhatsApp messaging. Send free-form messages inside Meta's 24-hour window, send approved templates at any time, list a number's templates with what each one needs, and look up a message's delivery status. See the WhatsApp guides and List WhatsApp Templates.
- Conversations and messages. List an agent's conversations, keep up with new messages, reply to customers as your team, open, close or archive a conversation and mark it read or unread, switch the AI off in it or end its pause, mark it urgent or resolved, and assign it. See Conversations and Messages.
- Contacts, notes and leads. Find and update contacts, write notes your team sees on the contact's timeline, create leads, move them through your statuses or delete them, and change when the AI saves a lead. See Contacts, Notes and Leads.
- Lead assignment, filters and fields. Assign leads to teammates, filter them by assignee or custom field, pin them, and add, change or remove the agent's custom lead fields. See Lead Assignment, Filters and Fields.
- Your team. List your teammates with their roles and emails, and who can be assigned an agent's leads. See Your Team.
- Agent knowledge. Add, replace and remove what the agent's AI answers from. See Agent Knowledge.
- Channels and follow-ups. Switch the AI on or off per channel for messages and comments, and set when it follows up with quiet customers. See Channels and Follow-ups.
- Comments. Read the Facebook and Instagram comments on an agent's pages with the reply under each, see which ones the AI hid and why, and hide or show one. See Comments and Auto-Hide.
- Website widget. Get an agent's website chat widget and the embed code to paste into a site. See Website Widget.
- Custom API tools. Give the agent's AI tools that call your own system, test them, switch them on and read their runs. See Custom API Tools.
- Agent analytics. Read an agent's activity day by day: new conversations, messages, customer mood, angry conversations and completed actions. See Agent Analytics.
- Plan and usage. See your plan, how much of this period's messages and agents you've used, and past billing periods. See Plan and Usage.
Messages sent through the API thread under the same conversation as inbound webhooks, so your dashboard view stays unified — one customer, one thread, regardless of which side started talking. An agent's endpoints live at /v1/agents/{agentId} and under it, with an id from GET /v1/agents; the WhatsApp send endpoints take agent_id in the body instead. Organization-wide reads (your members, and your plan and usage) live under /v1/organization/.
Where do I get an API key?
Sign in to the Mojeeb dashboard and open the API Keys page from the sidebar. The feature is available on the Starter and Professional plans. Keys look like mk_live_8aB3cDe4FgH5iJ6kLm7nOp_a1b2c3d4e5 and are shown once at creation — store like a database password.
See Authentication for full details on key format, scopes, per-agent restrictions, and what a key can do.
Is the API stable?
Yes. Everything under /v1/ is forever-stable — additive changes only. New optional fields, new error codes, and new endpoints can appear without notice; nothing existing will be renamed, removed, or change meaning. A breaking change requires a new /v2/ path. Your /v1/ integration will keep working as we evolve the platform.
Where do I start?
The fastest path is the 5-minute Quickstart — a single curl command sends your first message. Once that works, Authentication, Idempotency, Rate Limits, and the Errors catalog cover everything you need for production.
The full machine-readable contract is rendered at API Reference and served by the API itself at https://api.mojeeb.app/v1/openapi.yaml (no key needed) — useful for SDK generation, Postman import, and AI tool builders that read OpenAPI.
Common questions
Is this API meant for browser or mobile clients?
No. The public API uses long-lived API keys and must run server-side only. For browser clients, embed the website widget; for mobile apps, show the same chat in a WebView (see Add the Chat to Your Mobile App); or use the dashboard's built-in views. Your server can fetch the widget's embed code with GET /v1/agents/{agentId}/widget.
Can I connect an AI assistant such as Claude or Cursor?
Yes, through the Mojeeb MCP server at https://mcp.mojeeb.app/mcp. It turns this API into 49 tools that Claude, Cursor, VS Code, n8n and other MCP clients can call with your API key, with an optional read-only mode and no deletes. See AI Assistants (MCP).
How is this different from the dashboard's "send" buttons?
The dashboard sends use your logged-in user session (JWT) and route through the same orchestrator as the public API — the underlying delivery mechanism is identical. The public API just lets you trigger sends from your own server with an API key instead of clicking buttons.
What channels are supported?
Replying in a conversation works on WhatsApp, Facebook, Instagram and your website chat. Starting a conversation is WhatsApp only, with a template. Contacts, leads and notes cover people from every channel, and the channel switches cover Facebook pages, Instagram accounts and WhatsApp numbers.
What can't the API do?
It doesn't create or delete agents, delete contacts or conversations, search inside message history, send attachments, reply to or delete comments, change your team or roles, touch billing, manage API keys, connect or disconnect channels, change the website widget, or create and edit WhatsApp templates. Those stay in the dashboard, where a person confirms them. It can delete leads, and a deleted lead can't be restored.
Where are the SDKs?
We don't ship official SDKs yet. The OpenAPI 3.1 spec lets you generate one in any language using openapi-generator or import to Postman/Insomnia for ad-hoc testing. If a customer asks for a specific language, contact support.