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 from a website URL or from structured codebase context.

Request Body

FieldTypeRequiredDescription
emailstringYesEmail address for the account that owns the agent.
company_namestringYesName of the company the agent represents.
website_urlstringNoWebsite to scrape for knowledge. Use this or codebase_context.
codebase_contextobjectNoStructured product and company details. Use this or website_url.
agent_namestringNoCustom name for the agent. Defaults to a generated name.
sourcestringNoWhere the request came from, for example cursor or claude_code.

Example: Website 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 Mode

Pass structured context directly when you do not have a public website to scrape.

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_codeReady to paste script tag that loads the chat widget on your site.
whatsapp_linkClick to chat WhatsApp link prefilled with a greeting.
claim_urlLink the user opens to claim and manage the new agent.
trial_info.message_limitNumber of messages allowed during the trial period.
knowledge_base_countNumber of knowledge base items created for the agent.

Authentication

There are two ways to authenticate requests.

Email based (default)

Provide an email and company name. A demo agent is created and a claim link is returned.

{
  "email": "you@company.com",
  "company_name": "Acme Corp"
}

API key (existing users)

Include the Authorization header. The agent is created under your account. Generate keys at automanus.io/dashboard/settings/api.

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 a knowledge base item to an existing agent. Content is embedded for retrieval.

Request Body

FieldTypeRequiredDescription
agent_idstringYesID of the agent to add knowledge to.
titlestringYesShort title for the knowledge item.
contentstringYesThe text content to store and embed.
item_typestringNofaq, product, policy, or document
categorystringNoOptional category label to organize items.

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 an API key. The agent must belong to your account. For demo agents created via the 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 requiredRequired fields are missing.
400Invalid email formatThe email format is invalid.
401Invalid API keyThe API key is missing or invalid.
409An agent already exists for this websiteAn agent already exists for this website.
429Rate limit exceededToo many requests. You have hit the rate limit.

Integration Example

Add the webchat widget to your site with a small React component.

// 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;
}