API リファレンス

AutoManus REST API を使って AI 営業エージェントをプログラムから作成します。

ベース URL

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

/agents

ウェブサイトの URL、または構造化されたコードベースのコンテキストから新しい AI 営業エージェントを作成します。

リクエストボディ

フィールド必須説明
emailstringはいエージェントを所有するアカウントのメールアドレス。
company_namestringはいエージェントが代表する会社名。
website_urlstringいいえナレッジを取得するウェブサイト。このフィールドまたは codebase_context を使用します。
codebase_contextobjectいいえ構造化された製品および会社情報。このフィールドまたは website_url を使用します。
agent_namestringいいえエージェントのカスタム名。既定では自動生成された名前が使用されます。
sourcestringいいえリクエストの送信元。例: cursor または claude_code。

例: ウェブサイトモード

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"
  }'

例: コードベースモード

クロールできる公開ウェブサイトがない場合は、構造化されたコンテキストを直接渡します。

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"
  }'

レスポンス

{
  "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
}

レスポンスフィールド

フィールド説明
webchat_embed_codeサイトにチャットウィジェットを読み込む、貼り付けるだけのスクリプトタグ。
whatsapp_linkあいさつ文が入力済みの、タップして会話できる WhatsApp リンク。
claim_urlユーザーが新しいエージェントを受け取って管理するために開くリンク。
trial_info.message_limitトライアル期間中に許可されるメッセージ数。
knowledge_base_countエージェント向けに作成されたナレッジベース項目の数。

認証

リクエストを認証する方法は 2 つあります。

メールベース(既定)

メールアドレスと会社名を指定します。デモエージェントが作成され、受け取り用リンクが返されます。

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

API キー(既存ユーザー)

Authorization ヘッダーを含めます。エージェントはあなたのアカウントの下に作成されます。キーは 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

既存のエージェントにナレッジベース項目を追加します。コンテンツは検索用に埋め込みベクトル化されます。

リクエストボディ

フィールド必須説明
agent_idstringはいナレッジを追加するエージェントの ID。
titlestringはいナレッジ項目の短いタイトル。
contentstringはい保存して埋め込みベクトル化するテキストコンテンツ。
item_typestringいいえfaq, product, policy, or document
categorystringいいえ項目を整理するための任意のカテゴリラベル。

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"
  }'

レスポンス

{
  "success": true,
  "knowledge_item_id": "uuid-here",
  "agent_id": "uuid-here",
  "agent_name": "Company Assistant",
  "embedding_generated": true
}

認証: API キーが必要です。エージェントはあなたのアカウントに属している必要があります。メールフローで作成されたデモエージェントの場合、認証は不要です。

レート制限

制限項目
メールごとの 1 日あたりのエージェント数10
1 分あたりのリクエスト数60

エラーコード

ステータスエラー説明
400email and company_name are required必須フィールドが不足しています。
400Invalid email formatメールの形式が無効です。
401Invalid API keyAPI キーがないか無効です。
409An agent already exists for this websiteこのウェブサイトのエージェントはすでに存在します。
429Rate limit exceededリクエストが多すぎます。レート制限に達しました。

統合の例

小さな React コンポーネントでウェブチャットウィジェットをサイトに追加します。

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