Integration HTTP API reference
Request fields and response semantics verified against the integration routes.
#Authentication and scope
Use Authorization: Bearer YOUR_PROJECT_API_KEY on every request. Base URL: https://memora-singapore.onrender.com. GET /v1/integrations/scope returns tenant_id, project_id, personal_subject_id, and personal_namespace for the key. Personal subject and namespace values must match the saved project connection. Keep keys private.
#POST /v1/integrations/messages
Returns HTTP 202 on accepted submission. Required string fields: subject_id (1–255 characters), conversation_id (1–255), idempotency_key (1–255), and content (1–100000). Optional namespace defaults to default (1–128). Unknown fields are rejected. Do not send role, project_id, or metadata; this endpoint derives the project from the key and fixes the role to user. The response includes id, status, and created. Acceptance is not confirmation that an Active memory exists.
#POST /v1/integrations/memories/search
Required fields: subject_id (1–255 characters) and query (1–2000). Optional namespace defaults to default (1–128), limit defaults to 6 (1–20), and token_budget defaults to 1200 (64–8192). Unknown fields are rejected. The response includes has_relevant_memories, memory_state, context, memories, citations, tokens_used, and retrieval_diagnostics. With no eligible results, context is null and memories and citations are empty; memory_state may be processing, indexing, none, or unknown. With results, memory_state is ready. These field bounds are validation limits, not throughput or latency guarantees.
#Handle errors
Inspect HTTP status before decoding a successful response. Validation errors return 422; correct the request rather than retrying unchanged. Authentication and scope failures require checking the credential and saved connection. Retrieval timeouts may return 503. Use bounded backoff for transient errors and reuse the same idempotency key when retrying an ingestion event. Do not log authorization headers or raw user messages.
#SDK delivery caveat
The current Python adapter creates a new idempotency key for each ingest_message call. Calling save_context again is a new submission, not an idempotent retry of the previous HTTP event. Applications requiring durable deduplication should use the REST endpoint with a persisted message identifier. Adapter environment variables in examples are application conventions; the package reads constructor arguments and does not automatically load an environment file.