API
API
REST API surface for MemHQ — memory operations, dashboard, connectors, webhooks.
API
MemHQ exposes a versioned REST API at https://api.memhq.ai. All requests are authenticated; all responses are JSON; all errors follow a single envelope shape.
Endpoints at a glance
- Memory —
add,search,ask. The three primitives that power agent memory. Authenticated via project API key. - Dashboard — Project management, usage, billing, and observability endpoints used by the web app. Authenticated via Clerk JWT.
- Connectors — Inbound webhook ingestion endpoint for external systems.
- Webhooks — Where MemHQ receives signed events from Clerk and Stripe.
For the full interactive reference with try-it-now request runners, see API Reference.
Auth at a glance
| Surface | Header | Format |
|---|---|---|
| Memory + Connectors | Authorization: Bearer mem_… | 64-char project key |
| Dashboard | Authorization: Bearer <Clerk JWT> | Issued by the dashboard |
| Webhooks (Clerk) | svix-id, svix-timestamp, svix-signature | Verified server-side |
| Webhooks (Stripe) | Stripe-Signature | Verified server-side |
Conventions
- Base URL:
https://api.memhq.ai - Versioning: every path is prefixed with
/v1/ - Errors:
{ "error": "human message", "code": "MACHINE_CODE", "correlationId": "…" } - Pagination: list endpoints accept
?cursor=…&limit=…and returnnext_cursorwhen more pages exist - Rate limits: surfaced via
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset,Retry-After