Integration API
The API your code and no-code tools use - its address, the connection test, every action and list per app, workspaces and errors.
On this page
The integration API is what Zapier, Make, n8n and AI assistants use, and you can use it too. Every route, field and answer is in the interactive API reference, generated from the code.
Address and authorization
https://www.zenhalab.com/api/integrations/v1Send an API key with every request (Authorization: Bearer …). Requests and answers are JSON; times are ISO 8601 in UTC.
The console's own API (/api/nomongeta/v1, see the REST API) works with a signed-in session, for the console's pages. The integration API is the one for keys and other software.
Start here
| Request | What it answers |
|---|---|
GET /me | Who the key acts as, its scopes and the apps it reaches. The connection test. |
GET /event-types | The events the key may subscribe, each with its JSON Schema and an example. |
GET /events/{type}/sample | Recent events of a type, as delivered (samples and polling). |
POST /hooks, DELETE /hooks/{id} | Subscribe and remove REST hooks. |
Actions and lists
The same things you'd do in the app, with the same rules: an id from someone else's account always answers 404.
Ñomongeta
| Request | What it does | Scope |
|---|---|---|
GET /nomongeta/flows | Lists the workspace's flows. | nomongeta:read |
GET /nomongeta/agents | Lists the workspace's agents. | nomongeta:read |
GET /nomongeta/templates | Lists the workspace's approved WhatsApp templates. | nomongeta:read |
POST /nomongeta/contacts | Adds a contact, or updates the one with that address (fields are the workspace's contact variables). | nomongeta:write |
GET /nomongeta/contacts/find | Finds a contact by address (phone number or e-mail). | nomongeta:read |
POST /nomongeta/conversations | Starts a WhatsApp conversation with an approved template, to a contact who opted in. | nomongeta:write |
POST /nomongeta/conversations/{conversationId}/messages | Sends a message in a conversation (free text inside WhatsApp's 24-hour window, a template any time). | nomongeta:write |
POST /nomongeta/conversations/{conversationId}/flow-runs | Starts an active flow in a conversation. | nomongeta:write |
POST /nomongeta/knowledge/documents | Adds a document to an agent's knowledge. | nomongeta:write |
Actions in the workspace act with the role of the admin who created the key, as in the console: lists and finding a contact need the Viewer role, adding or updating contacts and sending messages the Agent role, starting flows and adding knowledge the Builder role.
Sending messages
POST /nomongeta/conversations/{conversationId}/messages writes in an existing conversation, shown in the inbox as coming from your integration. On WhatsApp, free text is only allowed within 24 hours of the contact's last message (409 outside_window otherwise); an approved template can be sent at any time. A conversation a teammate has taken over stays theirs.
Starting a WhatsApp conversation
POST /nomongeta/conversations writes first to a contact who hasn't messaged you, with an approved template (templateId + params): WhatsApp lets a business start only that way. It goes out from the template's number, and the conversation belongs to that number's agent; when the contact answers, the number's flow or agent carries on. A live conversation with them on that number is reused (created: false).
WhatsApp also requires that the person agreed to hear from you. Send optIn: true when you collected that agreement (a form, a checkout box), or record it beforehand with optedIn: true when you add or update the contact (false withdraws it). Without it the call answers 409 not_opted_in and nothing is sent. A contact who replies with just SAIR, PARAR or STOP has their opt-in withdrawn.
Signing in with OAuth
Apps we registered (Zapier, n8n) can also connect by signing in, with OAuth 2.0 and PKCE, instead of a pasted key. Their token acts as the person: personal apps directly, and the Ñomongeta workspaces they can open by naming one in the X-Workspace-Id header (GET /me lists them). The person's role in that workspace applies.
Errors
Errors answer { "error": "<code>", … } with the fields that explain it. The common ones are under API keys; actions add their own, like outside_window, run_active (another flow is running in that conversation) or handed_off. The reference lists them per route.
Still stuck?
Ask us. We read every message.