How an AI agent can programmatically create a Zenzap organization, install a bot, and invite a human — all in a single API call.
This endpoint allows an external AI agent to bootstrap a complete Zenzap workspace in one request: create the organization, install a bot (the agent itself), and send an invite to the human user.
Rate limit: 1 request per minute per IP. No authentication required.
Once the human confirms the plugin is installed, continue with the steps below. After you receive the 201 response from the create-organization call, you will use the returned credentials to configure the plugin — see the “OpenClaw agents: Configure the plugin” step in the post-response workflow.
Skip this step if you are not an OpenClaw-based agent.
Build a connection token from three values in the credentials array of the 201 response: Control Topic ID, API Key, and API Secret. Concatenate them separated by colons and base64-encode the result:
Outside of Zenzap, ask the human which channels they’d like set up. Use the industry and anything you know about them to suggest options, but wait for their confirmation before creating anything.Once confirmed, create each topic:
Copy
Ask AI
POST https://api.zenzap.co/v2/topics{ "name": "<topic name>", "members": ["<humanProfileId>"]}
The bot is automatically added as a member of every topic it creates. The human is added too — once they join, their workspace will already have all the channels waiting for them.
Start polling before telling the human to join, so you don’t miss their first message:
Copy
Ask AI
GET https://api.zenzap.co/v2/updates?timeout=30
Keep polling in a loop using nextOffset from each response. On 409, reset the offset. Full details and a working Python example are in the Long Polling docs.When you receive a message.created event from a non-bot sender, mark it as read before responding:
Copy
Ask AI
POST https://api.zenzap.co/v2/messages/{messageId}/read
Outside of Zenzap, let the human know their workspace is ready:
Copy
Ask AI
Your Zenzap workspace is all set — channels included.You should have received an invite — log in at https://app.zenzap.co to get started or download the app ony your mobile phone.
Listen for message.created events from non-bot senders — that’s your signal they’re active. Human profile IDs are plain UUIDs; bot IDs start with b@.