{"title":"API 概要 & ベース URL","slug":"overview","category":"api","summary":"Synapse API の全エンドポイント、ベース URL、認証パターン、レスポンス形式を一覧でご紹介します。","audience":["human","llm"],"tags":["api","overview","endpoints"],"difficulty":"beginner","updated":"2026-06-27","word_count":374,"read_minutes":2,"llm_context":"Base URL: https://synapse.schaefer.zone\nAuth: Authorization: Bearer YOUR_MIND_KEY (header, no rate limit)\n      OR ?key=YOUR_MIND_KEY (query, 60 req/min)\nAll responses are JSON except /memory/recall (text/plain) and /docs (HTML/text/json)\nAll 404 responses mean the path does not exist — do NOT guess paths.\nGET /endpoints returns machine-readable list of all valid endpoints.\n","lang":"ja","translated":true,"requested_lang":"ja","content_markdown":"\n# API 概要 & ベース URL\n\nSynapse API は RESTful な HTTP API です。特記のない限り、すべてのエンドポイントは JSON を返します。本ページでは、各エンドポイントの詳細に入る前に知っておくべき基本事項を説明します。\n\n## ベース URL\n\n```\nhttps://synapse.schaefer.zone\n```\n\n本ドキュメント内のすべてのパスは、このベース URL に対する相対パスです。セルフホスト環境の場合は、ご自身の URL に置き換えてください。\n\n## 認証\n\n2 種類の方法があり、いずれも `Authorization` ヘッダーで送信します。\n\n```\nAuthorization: Bearer YOUR_MIND_KEY    # for data endpoints\nAuthorization: Bearer YOUR_JWT          # for account endpoints\n```\n\nまたはクエリパラメータで送信することも可能です（60 回/分にレート制限されます）。\n\n```\n?key=YOUR_MIND_KEY\n```\n\n詳しくは [Authentication](/docs/getting-started/authentication) を参照してください。\n\n## エンドポイントグループ\n\n| グループ | 認証 | 説明 |\n|-------|------|-------------|\n| Public | なし | ランディングページ、ヘルスチェック、OpenAPI、ドキュメント |\n| Memory | Mind Key | CRUD、検索、同期、埋め込み |\n| Chat | Mind Key / JWT | 人間とエージェント間の非同期メッセージング |\n| Tasks | Mind Key | タスク管理 |\n| Scripts | Mind Key / JWT | 永続スクリプトストア |\n| Scheduler | Mind Key | Cron ジョブ + 変数 |\n| Webhooks | Mind Key | イベント時の HTTP コールバック |\n| Computers | Mind Key / JWT | リモートコンピュータ制御 |\n| User/Minds | JWT | アカウント + mind 管理 |\n| Sharing | JWT | ユーザー間の mind 共有 |\n| Push | JWT | Web Push サブスクリプション |\n| Tools | なし | 時刻、電卓、乱数（パブリックユーティリティ） |\n\n## レスポンス形式\n\n- **JSON**（デフォルト）：`{ \"key\": \"value\", ... }`\n- **プレーンテキスト**：`/memory/recall` は LLM 向けに最適化されたテキストを返します\n- **HTML**：`/`、`/docs`、`/human`、`/support`、`/playground`\n\n## 標準レスポンスエンベロープ\n\n成功時のレスポンスはデータを直接返します。\n\n```json\n{ \"id\": \"mem_001\", \"status\": \"stored\" }\n```\n\nエラー時のレスポンスは以下の形式を使用します。\n\n```json\n{\n  \"statusCode\": 401,\n  \"error\": \"Unauthorized\",\n  \"message\": \"Mind Key fehlt oder ungültig.\",\n  \"docs\": \"https://synapse.schaefer.zone/docs/getting-started/authentication\"\n}\n```\n\n> [!NOTE]\n> `docs` フィールドは、よくあるエラーに関するドキュメントへのリンクを提供します。\n\n## HTTP ステータスコード\n\n| コード | 意味 |\n|------|---------|\n| 200 | 成功（GET、PUT） |\n| 201 | 作成済み（POST） |\n| 204 | コンテンツなし（DELETE） |\n| 400 | 不正なリクエスト（バリデーションエラー） |\n| 401 | 認証エラー（トークン missing/invalid） |\n| 403 | 禁止（トークン種別の不一致） |\n| 404 | 見つからない（パスが存在しない） |\n| 409 | 競合（重複） |\n| 429 | リクエスト過多（レート制限） |\n| 500 | サーバーエラー |\n\n## 探索用エンドポイント\n\n| エンドポイント | 目的 |\n|----------|---------|\n| `GET /` | ランディングページ（LLM 向け最適化） |\n| `GET /endpoints` | すべてのエンドポイントの機械可読リスト |\n| `GET /endpoints?format=text` | プレーンテキスト形式のエンドポイントリスト |\n| `GET /openapi.json` | OpenAPI 3.0 仕様 |\n| `GET /help` | 完全な API ドキュメント（HTML） |\n| `GET /help?format=json` | JSON 形式の API ドキュメント |\n| `GET /docs` | ドキュメントシステム（HTML） |\n| `GET /docs?format=json` | ドキュメントインデックス（JSON） |\n| `GET /docs?format=text&scope=all` | すべてのドキュメントを 1 つのテキストブロックで |\n| `GET /playground` | インタラクティブな API プレイグラウンド |\n\n## レート制限\n\n| 認証方法 | 制限 |\n|-------------|-------|\n| Mind Key（ヘッダー） | なし |\n| Mind Key（?key=） | 60 回/分（IP ごと） |\n| JWT（ヘッダー） | なし |\n| パブリックエンドポイント | なし |\n\nレート制限対象のレスポンスには以下が含まれます。\n\n```\nX-RateLimit-Limit: 60\nX-RateLimit-Remaining: 42\nRetry-After: 30  (only when 429)\n```\n\n## ページネーション\n\nリストエンドポイントは `?limit=` と `?offset=` をサポートしています。\n\n```\nGET /memory?limit=50&offset=100\nGET /mind/tasks?status=pending\n```\n\nデフォルトの limit：100。最大 limit：500。\n\n## CORS\n\nすべてのエンドポイントはブラウザベースのクライアント向けに CORS をサポートしています。\n\n```\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS\nAccess-Control-Allow-Headers: Authorization, Content-Type, X-Synapse-JWT, Mcp-Session-Id, Mcp-Tool-Profile\n```\n\n## SDK & クライアント\n\n- **Node.js SDK**：`npm install synapse-memory-sdk`（[リポジトリ](https://gitlab.com/schaefer-services/synapse-sdk-js)）\n- **MCP Server**：`npx -y synapse-mcp-api@latest`（[リポジトリ](https://gitlab.com/schaefer-services/synapse-mcp)）\n- **HTTP クライアント**：任意の HTTP ライブラリ（curl、fetch、axios など）\n\n## 次のステップ\n\n- [Memory API](/docs/api/memory) — 最も重要なエンドポイント\n- [Chat API](/docs/api/chat) — 人間とエージェント間の非同期通信\n- [Errors & Error Handling](/docs/api/errors)\n","content_html":"<h1>API 概要 &amp; ベース URL</h1>\n<p>Synapse API は RESTful な HTTP API です。特記のない限り、すべてのエンドポイントは JSON を返します。本ページでは、各エンドポイントの詳細に入る前に知っておくべき基本事項を説明します。</p>\n<h2>ベース URL</h2>\n<pre><code class=\"hljs language-plaintext\">https://synapse.schaefer.zone</code></pre><p>本ドキュメント内のすべてのパスは、このベース URL に対する相対パスです。セルフホスト環境の場合は、ご自身の URL に置き換えてください。</p>\n<h2>認証</h2>\n<p>2 種類の方法があり、いずれも <code>Authorization</code> ヘッダーで送信します。</p>\n<pre><code class=\"hljs language-plaintext\">Authorization: Bearer YOUR_MIND_KEY    # for data endpoints\nAuthorization: Bearer YOUR_JWT          # for account endpoints</code></pre><p>またはクエリパラメータで送信することも可能です（60 回/分にレート制限されます）。</p>\n<pre><code class=\"hljs language-plaintext\">?key=YOUR_MIND_KEY</code></pre><p>詳しくは <a href=\"/docs/getting-started/authentication\">Authentication</a> を参照してください。</p>\n<h2>エンドポイントグループ</h2>\n<table>\n<thead>\n<tr>\n<th>グループ</th>\n<th>認証</th>\n<th>説明</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Public</td>\n<td>なし</td>\n<td>ランディングページ、ヘルスチェック、OpenAPI、ドキュメント</td>\n</tr>\n<tr>\n<td>Memory</td>\n<td>Mind Key</td>\n<td>CRUD、検索、同期、埋め込み</td>\n</tr>\n<tr>\n<td>Chat</td>\n<td>Mind Key / JWT</td>\n<td>人間とエージェント間の非同期メッセージング</td>\n</tr>\n<tr>\n<td>Tasks</td>\n<td>Mind Key</td>\n<td>タスク管理</td>\n</tr>\n<tr>\n<td>Scripts</td>\n<td>Mind Key / JWT</td>\n<td>永続スクリプトストア</td>\n</tr>\n<tr>\n<td>Scheduler</td>\n<td>Mind Key</td>\n<td>Cron ジョブ + 変数</td>\n</tr>\n<tr>\n<td>Webhooks</td>\n<td>Mind Key</td>\n<td>イベント時の HTTP コールバック</td>\n</tr>\n<tr>\n<td>Computers</td>\n<td>Mind Key / JWT</td>\n<td>リモートコンピュータ制御</td>\n</tr>\n<tr>\n<td>User/Minds</td>\n<td>JWT</td>\n<td>アカウント + mind 管理</td>\n</tr>\n<tr>\n<td>Sharing</td>\n<td>JWT</td>\n<td>ユーザー間の mind 共有</td>\n</tr>\n<tr>\n<td>Push</td>\n<td>JWT</td>\n<td>Web Push サブスクリプション</td>\n</tr>\n<tr>\n<td>Tools</td>\n<td>なし</td>\n<td>時刻、電卓、乱数（パブリックユーティリティ）</td>\n</tr>\n</tbody></table>\n<h2>レスポンス形式</h2>\n<ul>\n<li><strong>JSON</strong>（デフォルト）：<code>{ &quot;key&quot;: &quot;value&quot;, ... }</code></li>\n<li><strong>プレーンテキスト</strong>：<code>/memory/recall</code> は LLM 向けに最適化されたテキストを返します</li>\n<li><strong>HTML</strong>：<code>/</code>、<code>/docs</code>、<code>/human</code>、<code>/support</code>、<code>/playground</code></li>\n</ul>\n<h2>標準レスポンスエンベロープ</h2>\n<p>成功時のレスポンスはデータを直接返します。</p>\n<pre><code class=\"hljs language-json\"><span class=\"hljs-punctuation\">{</span> <span class=\"hljs-attr\">&quot;id&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;mem_001&quot;</span><span class=\"hljs-punctuation\">,</span> <span class=\"hljs-attr\">&quot;status&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;stored&quot;</span> <span class=\"hljs-punctuation\">}</span></code></pre><p>エラー時のレスポンスは以下の形式を使用します。</p>\n<pre><code class=\"hljs language-json\"><span class=\"hljs-punctuation\">{</span>\n  <span class=\"hljs-attr\">&quot;statusCode&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-number\">401</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;error&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;Unauthorized&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;message&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;Mind Key fehlt oder ungültig.&quot;</span><span class=\"hljs-punctuation\">,</span>\n  <span class=\"hljs-attr\">&quot;docs&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;https://synapse.schaefer.zone/docs/getting-started/authentication&quot;</span>\n<span class=\"hljs-punctuation\">}</span></code></pre><div class=\"callout callout-note\">`docs` フィールドは、よくあるエラーに関するドキュメントへのリンクを提供します。</div><h2>HTTP ステータスコード</h2>\n<table>\n<thead>\n<tr>\n<th>コード</th>\n<th>意味</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>200</td>\n<td>成功（GET、PUT）</td>\n</tr>\n<tr>\n<td>201</td>\n<td>作成済み（POST）</td>\n</tr>\n<tr>\n<td>204</td>\n<td>コンテンツなし（DELETE）</td>\n</tr>\n<tr>\n<td>400</td>\n<td>不正なリクエスト（バリデーションエラー）</td>\n</tr>\n<tr>\n<td>401</td>\n<td>認証エラー（トークン missing/invalid）</td>\n</tr>\n<tr>\n<td>403</td>\n<td>禁止（トークン種別の不一致）</td>\n</tr>\n<tr>\n<td>404</td>\n<td>見つからない（パスが存在しない）</td>\n</tr>\n<tr>\n<td>409</td>\n<td>競合（重複）</td>\n</tr>\n<tr>\n<td>429</td>\n<td>リクエスト過多（レート制限）</td>\n</tr>\n<tr>\n<td>500</td>\n<td>サーバーエラー</td>\n</tr>\n</tbody></table>\n<h2>探索用エンドポイント</h2>\n<table>\n<thead>\n<tr>\n<th>エンドポイント</th>\n<th>目的</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>GET /</code></td>\n<td>ランディングページ（LLM 向け最適化）</td>\n</tr>\n<tr>\n<td><code>GET /endpoints</code></td>\n<td>すべてのエンドポイントの機械可読リスト</td>\n</tr>\n<tr>\n<td><code>GET /endpoints?format=text</code></td>\n<td>プレーンテキスト形式のエンドポイントリスト</td>\n</tr>\n<tr>\n<td><code>GET /openapi.json</code></td>\n<td>OpenAPI 3.0 仕様</td>\n</tr>\n<tr>\n<td><code>GET /help</code></td>\n<td>完全な API ドキュメント（HTML）</td>\n</tr>\n<tr>\n<td><code>GET /help?format=json</code></td>\n<td>JSON 形式の API ドキュメント</td>\n</tr>\n<tr>\n<td><code>GET /docs</code></td>\n<td>ドキュメントシステム（HTML）</td>\n</tr>\n<tr>\n<td><code>GET /docs?format=json</code></td>\n<td>ドキュメントインデックス（JSON）</td>\n</tr>\n<tr>\n<td><code>GET /docs?format=text&amp;scope=all</code></td>\n<td>すべてのドキュメントを 1 つのテキストブロックで</td>\n</tr>\n<tr>\n<td><code>GET /playground</code></td>\n<td>インタラクティブな API プレイグラウンド</td>\n</tr>\n</tbody></table>\n<h2>レート制限</h2>\n<table>\n<thead>\n<tr>\n<th>認証方法</th>\n<th>制限</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Mind Key（ヘッダー）</td>\n<td>なし</td>\n</tr>\n<tr>\n<td>Mind Key（?key=）</td>\n<td>60 回/分（IP ごと）</td>\n</tr>\n<tr>\n<td>JWT（ヘッダー）</td>\n<td>なし</td>\n</tr>\n<tr>\n<td>パブリックエンドポイント</td>\n<td>なし</td>\n</tr>\n</tbody></table>\n<p>レート制限対象のレスポンスには以下が含まれます。</p>\n<pre><code class=\"hljs language-plaintext\">X-RateLimit-Limit: 60\nX-RateLimit-Remaining: 42\nRetry-After: 30  (only when 429)</code></pre><h2>ページネーション</h2>\n<p>リストエンドポイントは <code>?limit=</code> と <code>?offset=</code> をサポートしています。</p>\n<pre><code class=\"hljs language-plaintext\">GET /memory?limit=50&amp;offset=100\nGET /mind/tasks?status=pending</code></pre><p>デフォルトの limit：100。最大 limit：500。</p>\n<h2>CORS</h2>\n<p>すべてのエンドポイントはブラウザベースのクライアント向けに CORS をサポートしています。</p>\n<pre><code class=\"hljs language-plaintext\">Access-Control-Allow-Origin: *\nAccess-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS\nAccess-Control-Allow-Headers: Authorization, Content-Type, X-Synapse-JWT, Mcp-Session-Id, Mcp-Tool-Profile</code></pre><h2>SDK &amp; クライアント</h2>\n<ul>\n<li><strong>Node.js SDK</strong>：<code>npm install synapse-memory-sdk</code>（<a href=\"https://gitlab.com/schaefer-services/synapse-sdk-js\">リポジトリ</a>）</li>\n<li><strong>MCP Server</strong>：<code>npx -y synapse-mcp-api@latest</code>（<a href=\"https://gitlab.com/schaefer-services/synapse-mcp\">リポジトリ</a>）</li>\n<li><strong>HTTP クライアント</strong>：任意の HTTP ライブラリ（curl、fetch、axios など）</li>\n</ul>\n<h2>次のステップ</h2>\n<ul>\n<li><a href=\"/docs/api/memory\">Memory API</a> — 最も重要なエンドポイント</li>\n<li><a href=\"/docs/api/chat\">Chat API</a> — 人間とエージェント間の非同期通信</li>\n<li><a href=\"/docs/api/errors\">Errors &amp; Error Handling</a></li>\n</ul>\n","urls":{"html":"/docs/api/overview","text":"/docs/api/overview?format=text","json":"/docs/api/overview?format=json","llm":"/docs/api/overview?format=llm"},"translations_available":["en","zh","hi","es","fr","ar","pt","ru","ja","de","it","ko","nl","pl","tr","sv","vi","th","id","uk"]}