Skip to main content

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, AI auto-disable, AI working hours and comment auto-hide. See Agent Settings.
  • WhatsApp messaging. Send free-form messages, text or a file, inside Meta's 24-hour window, send approved templates at any time, list a number's templates with what each one needs, create, edit and delete templates and follow Meta's review of each, send broadcasts to many numbers, and look up a message's delivery status. See the WhatsApp guides, Create and Manage WhatsApp Templates and Send WhatsApp Broadcasts.
  • Conversations and messages. List an agent's conversations, keep up with new messages, reply to customers as your team with text or a file, open, close or archive a conversation and mark it read or unread, switch the AI off in it or end its pause, see who switched its AI off and why, mark it urgent or resolved, assign it, and test the agent in a chat that returns its answer. 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, move many leads to a new status at once, and change when the AI saves a lead. A conversation can hold several leads and several tickets, and you can list both for a conversation. 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.
  • Tickets. Open complaints, issues and refund requests as tickets, find them by number, status, assignee or custom field, move them to a closing status one at a time or many at once, assign or delete them, change the agent's ticket fields, change when the AI opens a ticket, and choose whether a new ticket switches the AI off. See Tickets.
  • Your team. List your teammates with their roles and emails, and who can be assigned an agent's leads; invite people, change their role or agents, and remove them; and turn Mojeeb Support access on or off. 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.
  • AI attachments. Manage the photos, albums, videos and documents the agent's AI sends to customers: add them, upload their media or import it from links, switch them on and off, get links to their files, and delete them. See AI Attachments.
  • Uploads. Stage a file for 24 hours and use its url wherever a media link is taken, for a file that isn't online. See Uploads.
  • Saved replies. List, create, replace, switch off and delete the saved replies your team sends from the inbox, and put images, a video or a document on them. See Saved Replies.
  • 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.

Every conversation, lead and ticket the API returns carries a link: its page in the Mojeeb dashboard, such as https://dashboard.mojeeb.app/conversations/{id}. Put it in your own system so your team can jump straight to the chat, client or ticket. The link grants nothing by itself; it opens only for a signed-in teammate who may see that record.

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 endpoints (your members and invitations, 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 112 tools that claude.ai, ChatGPT, Claude Code, Cursor, VS Code, n8n and other MCP clients can call, after you sign in with your Mojeeb account or with an API key, with an optional read-only mode. 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, reply to or delete comments, change an owner, touch billing, manage API keys, connect or disconnect channels, or change the website widget. Those stay in the dashboard, where a person confirms them. It can delete leads, tickets, WhatsApp templates, AI attachments and saved replies, which can't be restored, it can move many leads or tickets to a new status at once, with no undo, and a key created by the owner can remove teammates.

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.