API Reference
Create AI sales agents programmatically with the AutoManus REST API.
Base URL
https://automanus.io/api/v1/publicPOST
/agents
Create a new AI sales agent. Provide a website URL for automatic research, or pass codebase context directly.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Email for account association. New users get magic link. | |
| company_name | string | Yes | Business/company name |
| website_url | string | No | Website to research. We scrape and analyze automatically. |
| codebase_context | object | No | Extracted content from codebase (for apps not yet deployed) |
| agent_name | string | No | Custom agent name. Default: "{company} Assistant" |
| source | string | No | Source identifier: cursor, claude_code, chatgpt, mcp, api |
Example: Website URL Mode
curl -X POST https://automanus.io/api/v1/public/agents \
-H "Content-Type: application/json" \
-d '{
"email": "founder@startup.com",
"company_name": "TechStartup",
"website_url": "https://techstartup.com",
"source": "cursor"
}'Example: Codebase Context Mode
For apps not yet deployed, provide extracted content directly:
curl -X POST https://automanus.io/api/v1/public/agents \
-H "Content-Type: application/json" \
-d '{
"email": "dev@startup.com",
"company_name": "TechStartup",
"codebase_context": {
"company_description": "AI-powered platform for workflow automation",
"value_proposition": "10x your productivity with AI",
"products": [
{
"name": "Pro Plan",
"description": "Full access to all AI features",
"price": "$99/month"
}
]
},
"source": "claude_code"
}'Response
{
"success": true,
"agent_id": "uuid-here",
"agent_name": "TechStartup Assistant",
"company_name": "TechStartup",
"webchat_embed_code": "<script src=\"https://automanus.io/widget/automanus-chat.js\" data-widget-key=\"wc_abc123\"></script>",
"webchat_widget_key": "wc_abc123",
"whatsapp_link": "https://wa.me/16506053956?text=Hi!%20I'd%20like%20to%20talk%20to%20TechStartup",
"is_new_user": true,
"claim_url": "https://automanus.io/login?invite=token-here",
"dashboard_url": "https://automanus.io/dashboard/ai-agent",
"trial_info": {
"expires_in_days": null,
"message_limit": 100
},
"knowledge_base_count": 5
}Response Fields
| Field | Description |
|---|---|
| webchat_embed_code | HTML script tag to embed webchat widget |
| whatsapp_link | wa.me link to chat on WhatsApp |
| claim_url | Magic link for new users to claim agent |
| trial_info.message_limit | Number of free AI messages (100 credits) |
| knowledge_base_count | KB items created from research |
Authentication
Two authentication methods are supported:
Email-based (Default)
Provide email in request body. New users receive magic link to claim agent.
{
"email": "you@company.com",
"company_name": "Acme Corp"
}API Key (For Existing Users)
Include Authorization header. Agent created under your account. Generate keys in dashboard.
curl -X POST https://automanus.io/api/v1/public/agents \
-H "Authorization: Bearer ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{"company_name": "Acme Corp", "website_url": "https://acme.com"}'POST
/knowledge
Add knowledge base items to an existing agent. Use this to enhance your agent with custom FAQs, product info, or policies.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| agent_id | string | Yes | UUID of the agent to add knowledge to |
| title | string | Yes | Title of the knowledge item |
| content | string | Yes | Content/body of the knowledge item |
| item_type | string | No | faq, product, policy, or document |
| category | string | No | Category name (e.g., "Pricing", "Support") |
Example
curl -X POST https://automanus.io/api/v1/public/knowledge \
-H "Authorization: Bearer ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "uuid-from-create-agent",
"title": "Pricing FAQ",
"content": "Our Pro plan starts at $99/month with unlimited users.",
"item_type": "faq",
"category": "Pricing"
}'Response
{
"success": true,
"knowledge_item_id": "uuid-here",
"agent_id": "uuid-here",
"agent_name": "Company Assistant",
"embedding_generated": true
}Authentication: Requires API key. The agent must belong to your account. For demo agents (created via email flow), no auth is required.
Rate Limits
| Limit | Value |
|---|---|
| Agents per email per day | 10 |
| Requests per minute | 60 |
Error Codes
| Status | Error | Description |
|---|---|---|
| 400 | email and company_name are required | Missing required fields |
| 400 | Invalid email format | Email validation failed |
| 401 | Invalid API key | API key authentication failed |
| 409 | An agent already exists for this website | Duplicate agent. Returns existing_agent info. |
| 429 | Rate limit exceeded | Too many agents created |
Integration Example
Add the webchat widget to your app:
// React component
import { useEffect } from 'react';
export function SalesChat({ widgetKey }) {
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://automanus.io/widget/automanus-chat.js';
script.setAttribute('data-widget-key', widgetKey);
script.async = true;
document.body.appendChild(script);
return () => document.body.removeChild(script);
}, [widgetKey]);
return null;
}