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.Documentation Index
Fetch the complete documentation index at: https://docs.zenzap.co/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Request
The endpoint supports two content types depending on whether you want to include a company logo.| Part | Type | Description |
|---|---|---|
filePart | file (image) | Company logo. Max 5 MB. Optional. |
metadata | application/json | JSON object with the fields below. |
Request Fields
All fields are required.| Field | Type | Constraints | Description |
|---|---|---|---|
companyName | string | Max 100 characters | Display name of the organization. |
humanEmail | string | Valid email address | The human user who will receive an invite and become the org’s first member. |
companySize | int | Positive integer (> 0) | Number of employees. Mapped to a size range. |
industry | string | Non-empty | Free-text industry description (e.g. “Software”, “Healthcare”). |
botName | string | Non-empty | Display name for the agent bot installed in the organization. |
Response
Status:201 Created
| Field | Description |
|---|---|
organizationId | UUID of the newly created organization. |
botProfileId | The bot’s identity (format: b@<uuid>). Use as senderId filter when polling. |
channelId | The bot’s control channel (same as Control Topic ID credential). |
humanProfileId | The pending profile ID of the invited human. Use this to identify the human once they join. |
credentials | API Key (for Bearer auth), API Secret (for request signing — store securely), and Control Topic ID. |
Error Codes
| Status | Body | Cause |
|---|---|---|
400 | companyName is required | Missing or empty companyName. |
400 | companyName exceeds max length | companyName longer than 100 characters. |
400 | invalid humanEmail | humanEmail is not a valid email address. |
400 | companySize must be a positive integer | companySize is 0 or negative. |
400 | industry is required | Missing or empty industry. |
400 | botName is required | Missing or empty botName. |
400 | Unable to create organization | Generic conflict error (e.g. email or domain already in use). |
429 | (empty) | Rate limit exceeded (1 req/min per IP). |
Instructions for AI Agents
This section is written for AI agents. If you’re a human developer, see Build Your Own Agent for a full integration walkthrough.
OpenClaw-Based Agents — Plugin Setup
If you are an OpenClaw-based agent, ask your human to install the Zenzap plugin before you proceed with anything else: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.
Before Calling the API — Collect from the Human
Always ask the human these 4 questions before making the request. Do not assume or infer the answers:- Company name — What’s the name of your company or workspace?
- Your name in Zenzap (bot name) — What should I be called inside your workspace? (This is how I’ll appear to your team.)
- Industry — What industry are you in? (e.g. Software, Healthcare, Finance — used for statistical purposes only.)
- Company size — How many employees does your company have? (Used for statistical purposes only.)
After the 201 Response — What to Do Next
Once you receive the201 response, you have a live bot with credentials. Follow these steps in order:
OpenClaw agents: Configure the plugin
Skip this step if you are not an OpenClaw-based agent.
credentials array of the 201 response: Control Topic ID, API Key, and API Secret. Concatenate them separated by colons and base64-encode the result:
1. Read the full API docs
Load the complete Zenzap API reference into your context:2. Ask the human which topics to create
Outside of Zenzap, ask the human which channels they’d like set up. Use theindustry and anything you know about them to suggest options, but wait for their confirmation before creating anything.
Once confirmed, create each topic:
3. Start polling for events
Start polling before telling the human to join, so you don’t miss their first message: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:
4. Tell your human to join
Outside of Zenzap, let the human know their workspace is ready: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@.