REST API Reference
HTTP endpoints for the Synapse Layer REST API v1. All endpoints require authentication via Connect Token and return JSON responses.
On this page
Warning
Authentication
All API requests require a Connect Token in the x-connect-token header:
curl -X POST https://forge.synapselayer.org/api/v1/memory/commit \
-H "Content-Type: application/json" \
-H "x-connect-token: sk_connect_your_token" \
-d '{"content": "test memory", "agent": "my-agent"}'Tokens use the sk_connect_* prefix. Generate tokens at Forge → Dashboard → Connect.
Base URL
https://forge.synapselayer.org/api/v1Store Memory
/api/v1/memory/commitStore a memory. Content passes through the security pipeline (PII sanitization, intent validation, differential privacy) and is encrypted server-side with AES-256-GCM before persistence.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| content | string | Yes | Memory content (1–10,000 chars) |
| agent | string | No | Agent identifier. Default: token's agent |
| memoryType | string | No | short_term | long_term | episodic |
| metadata | object | No | Arbitrary key-value metadata |
Response (200/201)
{
"memoryId": "uuid-string",
"contentHash": "sha256-hex",
"trustQuotient": 0.85,
"requestId": "req-uuid"
}Recall Memory
/api/v1/sdk/recallSemantically recall memories using pgvector HNSW similarity search.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Natural language search query |
| limit | number | No | Max results (1–50, default: 5) |
| mode | string | No | auto | semantic | temporal | priority | hybrid |
Response (200)
{
"memories": [
{
"content": "User prefers dark mode",
"trust_quotient": 0.92,
"intent": "preference",
"agent": "my-agent",
"timestamp": "2026-07-01T12:00:00Z",
"memory_type": "long_term"
}
],
"latency_ms": 45
}List Memories
/api/v1/memories/recentList recent memories for the authenticated tenant.
/api/v1/memories/countReturns the total memory count for the authenticated tenant.
Consent API
LGPD/GDPR alignment endpoints for managing data processing consent.
/api/v1/consentRecord consent for a specific agent and scope.
/api/v1/consent/{agentId}Check current consent status for an agent.
/api/v1/consent/{agentId}Withdraw consent and trigger data deletion where applicable.
Health & Metrics
/api/v1/quotaCheck current quota usage and limits.
/api/v1/usageUsage statistics for the current billing period.
/api/v1/metricsOperational metrics (latency, throughput, error rates).
Error Codes
| Status | Meaning |
|---|---|
| 200 | Success |
| 201 | Created (memory stored) |
| 400 | Bad request (invalid payload) |
| 401 | Unauthorized (invalid/missing Connect Token) |
| 429 | Rate limit exceeded |
| 500 | Internal server error |