Skip to content

API Reference Overview

beginner

Base URL, authentication methods, rate limits, pagination, versioning, and request format for the Engramma API.

Base URL

All API requests use the following base URL:

https://api.engramma-memory.com/v1

All requests must be made over HTTPS. HTTP requests are rejected with a 301 redirect.

Authentication

Two authentication methods are supported:

MethodHeaderUse case
API KeyX-API-Key: nx_live_...Server-to-server, SDKs, scripts
JWT BearerAuthorization: Bearer eyJ...Browser apps, user-scoped access

API keys start with nx_live_ (production) or nx_test_ (development). Both are 48 characters long.

curl https://api.engramma-memory.com/v1/memory/stats \
  -H "X-API-Key: nx_live_abc123def456..."

Rate limits

Rate limits depend on your plan tier:

PlanRequests/secondBurst (10s window)
Free10 req/s50
Starter50 req/s250
Professional200 req/s1,000
Business500 req/s2,500
EnterpriseCustomCustom

Every response includes rate limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per second for your tier
X-RateLimit-RemainingRemaining requests in the current window
X-RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait (only on 429 responses)

Request format

  • Content-Type: application/json for all request bodies
  • Accept: application/json (default)
  • Character encoding: UTF-8

All request bodies are JSON. Query parameters are used for filtering and pagination on GET endpoints.

Pagination

List endpoints return paginated results:

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
per_pageinteger20Items per page (max 100)

Paginated responses include:

{
  "data": [...],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 142,
    "total_pages": 8,
    "has_next": true,
    "has_prev": false
  }
}

Versioning

The API version is included in the URL path (/v1/). Breaking changes result in a new version. Non-breaking additions (new fields, new endpoints) are added to the current version.

VersionStatusEOL
v1Current, stable

When a new version is released, the previous version remains supported for 12 months.

Response format

All successful responses return JSON with consistent structure:

Single resource:

{
  "id": "mem_abc123",
  "text": "...",
  "stored_at": "2026-01-15T10:30:00Z"
}

Collection:

{
  "data": [...],
  "pagination": { ... }
}

Action result:

{
  "success": true,
  "message": "Operation completed"
}

Timestamps

All timestamps are ISO 8601 format in UTC:

2026-01-15T10:30:00Z

IDs

Resource IDs use prefixed format:

ResourcePrefixExample
Memorymem_mem_abc123
Organizationorg_org_xyz789
Membermem_mem_def456
API Keykey_key_ghi012
Invoiceinv_inv_jkl345
Webhookwh_wh_mno678

SDKs

Official SDKs handle authentication, rate limiting, retries, and pagination automatically:

LanguagePackageInstall
Pythonengramma-cloudpip install engramma-cloud
JavaScript@engramma/sdknpm install @engramma/sdk
Goengramma-gogo get github.com/engramma/engramma-go

Next steps