{"title":"API Overview और Base URL","slug":"overview","category":"api","summary":"एक नज़र में सभी Synapse API एंडपॉइंट्स, base URL, प्रमाणीकरण पैटर्न, और प्रतिक्रिया प्रारूप।","audience":["human","llm"],"tags":["api","overview","endpoints"],"difficulty":"beginner","updated":"2026-06-27","word_count":578,"read_minutes":3,"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":"hi","translated":true,"requested_lang":"hi","content_markdown":"\n# API Overview और Base URL\n\nSynapse API एक RESTful HTTP API है। सभी एंडपॉइंट्स JSON लौटाते हैं (जहाँ उल्लेख किया गया है वहाँ को छोड़कर)। यह पृष्ठ विशिष्ट एंडपॉइंट्स में गोता लगाने से पहले आवश्यक मूल बातें कवर करता है।\n\n## Base URL\n\n```\nhttps://synapse.schaefer.zone\n```\n\nइस दस्तावेज़ीकरण के सभी पाथ इस base URL के सापेक्ष हैं। सेल्फ-होस्टेड इंस्टेंस के लिए, अपने स्वयं के URL से बदलें।\n\n## प्रमाणीकरण\n\nदो विधियाँ, दोनों `Authorization` हेडर के माध्यम से भेजी जाती हैं:\n\n```\nAuthorization: Bearer YOUR_MIND_KEY    # for data endpoints\nAuthorization: Bearer YOUR_JWT          # for account endpoints\n```\n\nया क्वेरी पैरामीटर के माध्यम से (60/min तक सीमित):\n\n```\n?key=YOUR_MIND_KEY\n```\n\nविवरण के लिए [प्रमाणीकरण](/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 | कोई नहीं | समय, calc, random (सार्वजनिक उपयोगिताएँ) |\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 | अनधिकृत (गायब/अमान्य टोकन) |\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` | सभी दस्तावेज़ एक टेक्स्ट ब्लॉक के रूप में |\n| `GET /playground` | इंटरैक्टिव API प्लेग्राउंड |\n\n## रेट लिमिट\n\n| प्रमाणीकरण विधि | सीमा |\n|-------------|-------|\n| Mind Key (हेडर) | कोई नहीं |\n| Mind Key (?key=) | प्रति IP 60/min |\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डिफ़ॉल्ट सीमा: 100। अधिकतम सीमा: 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## SDKs और क्लाइंट्स\n\n- **Node.js SDK**: `npm install synapse-memory-sdk` ([repo](https://gitlab.com/schaefer-services/synapse-sdk-js))\n- **MCP Server**: `npx -y synapse-mcp-api@latest` ([repo](https://gitlab.com/schaefer-services/synapse-mcp))\n- **HTTP client**: कोई भी HTTP लाइब्रेरी (curl, fetch, axios, आदि)\n\n## अगले कदम\n\n- [Memory API](/docs/api/memory) — सबसे महत्वपूर्ण एंडपॉइंट्स\n- [Chat API](/docs/api/chat) — अतुल्यकालिक मानव-एजेंट संचार\n- [त्रुटियाँ और त्रुटि प्रबंधन](/docs/api/errors)\n","content_html":"<h1>API Overview और Base URL</h1>\n<p>Synapse API एक RESTful HTTP API है। सभी एंडपॉइंट्स JSON लौटाते हैं (जहाँ उल्लेख किया गया है वहाँ को छोड़कर)। यह पृष्ठ विशिष्ट एंडपॉइंट्स में गोता लगाने से पहले आवश्यक मूल बातें कवर करता है।</p>\n<h2>Base URL</h2>\n<pre><code class=\"hljs language-plaintext\">https://synapse.schaefer.zone</code></pre><p>इस दस्तावेज़ीकरण के सभी पाथ इस base URL के सापेक्ष हैं। सेल्फ-होस्टेड इंस्टेंस के लिए, अपने स्वयं के URL से बदलें।</p>\n<h2>प्रमाणीकरण</h2>\n<p>दो विधियाँ, दोनों <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/min तक सीमित):</p>\n<pre><code class=\"hljs language-plaintext\">?key=YOUR_MIND_KEY</code></pre><p>विवरण के लिए <a href=\"/docs/getting-started/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>समय, calc, random (सार्वजनिक उपयोगिताएँ)</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>अनधिकृत (गायब/अमान्य टोकन)</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>सभी दस्तावेज़ एक टेक्स्ट ब्लॉक के रूप में</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>प्रति IP 60/min</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>डिफ़ॉल्ट सीमा: 100। अधिकतम सीमा: 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>SDKs और क्लाइंट्स</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\">repo</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\">repo</a>)</li>\n<li><strong>HTTP client</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\">त्रुटियाँ और त्रुटि प्रबंधन</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"]}