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.

#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.