API Reference

Create AI sales agents programmatically with the AutoManus REST API.

Base URL

https://automanus.io/api/v1/public
POST

/agents

Create a new AI sales agent. Provide a website URL for automatic research, or pass codebase context directly.

Request Body

FieldTypeRequiredDescription
emailstringYesEmail for account association. New users get magic link.
company_namestringYesBusiness/company name
website_urlstringNoWebsite to research. We scrape and analyze automatically.
codebase_contextobjectNoExtracted content from codebase (for apps not yet deployed)
agent_namestringNoCustom agent name. Default: "{company} Assistant"
sourcestringNoSource 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

FieldDescription
webchat_embed_codeHTML script tag to embed webchat widget
whatsapp_linkwa.me link to chat on WhatsApp
claim_urlMagic link for new users to claim agent
trial_info.message_limitNumber of free AI messages (100 credits)
knowledge_base_countKB 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

FieldTypeRequiredDescription
agent_idstringYesUUID of the agent to add knowledge to
titlestringYesTitle of the knowledge item
contentstringYesContent/body of the knowledge item
item_typestringNofaq, product, policy, or document
categorystringNoCategory 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

LimitValue
Agents per email per day10
Requests per minute60

Error Codes

StatusErrorDescription
400email and company_name are requiredMissing required fields
400Invalid email formatEmail validation failed
401Invalid API keyAPI key authentication failed
409An agent already exists for this websiteDuplicate agent. Returns existing_agent info.
429Rate limit exceededToo 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;
}