API リファレンス
AutoManus REST API を使って AI 営業エージェントをプログラムから作成します。
ベース URL
https://automanus.io/api/v1/publicPOST
/agents
ウェブサイトの URL、または構造化されたコードベースのコンテキストから新しい AI 営業エージェントを作成します。
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| string | はい | エージェントを所有するアカウントのメールアドレス。 | |
| company_name | string | はい | エージェントが代表する会社名。 |
| website_url | string | いいえ | ナレッジを取得するウェブサイト。このフィールドまたは codebase_context を使用します。 |
| codebase_context | object | いいえ | 構造化された製品および会社情報。このフィールドまたは website_url を使用します。 |
| agent_name | string | いいえ | エージェントのカスタム名。既定では自動生成された名前が使用されます。 |
| source | string | いいえ | リクエストの送信元。例: 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_id | string | はい | ナレッジを追加するエージェントの ID。 |
| title | string | はい | ナレッジ項目の短いタイトル。 |
| content | string | はい | 保存して埋め込みベクトル化するテキストコンテンツ。 |
| item_type | string | いいえ | faq, product, policy, or document |
| category | string | いいえ | 項目を整理するための任意のカテゴリラベル。 |
例
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 |
エラーコード
| ステータス | エラー | 説明 |
|---|---|---|
| 400 | email and company_name are required | 必須フィールドが不足しています。 |
| 400 | Invalid email format | メールの形式が無効です。 |
| 401 | Invalid API key | API キーがないか無効です。 |
| 409 | An agent already exists for this website | このウェブサイトのエージェントはすでに存在します。 |
| 429 | Rate 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;
}