MemorySync
API Reference

Billing

Read the current plan, usage, invoices, and billing alerts for the active organisation. The billing routes live under /org/billing/*; this page covers the most common read.
GET/org/billing/current-plan

Authentication

Accepts a JWT bearer token (Authorization: Bearer eyJ…) or an API key (X-API-Key: ms_live_…). API-key callers should send X-Project-ID unless the key is project-locked. Cross-tenant operators must send X-Tenant-ID.

Response

Returns 200 OK with the following body.

FieldTypeRequiredDescription
plan_idstringoptionalPlan slug (free, pro, scale, …).
statusstringoptionalactive | past_due | canceled.
current_period_startstringoptionalRFC 3339 UTC.
current_period_endstringoptionalRFC 3339 UTC.
quotasobjectoptional{ memory_writes, memory_queries, integrations, … }.
usageobjectoptionalSame shape as quotas with current consumption.
200.json
{
"plan_id": "pro",
"status": "active",
"current_period_start": "2026-05-01T00:00:00Z",
"current_period_end": "2026-06-01T00:00:00Z",
"quotas": {
"memory_writes": 100000,
"memory_queries": 1000000
},
"usage": {
"memory_writes": 18421,
"memory_queries": 211042
}
}

Errors

StatusCodeDescription
400validation_errorBody or query failed schema validation. The error includes the offending field name.
401unauthenticatedMissing or invalid bearer token / API key.
403forbiddenAuthenticated principal lacks the required scope, role, or project access.
404not_foundTarget resource does not exist or is not visible to the calling tenant.
429rate_limitedPer-IP or per-route limit exceeded. Respect the Retry-After header.
500internal_errorUnhandled server error. Quote the request_id when contacting support.

Examples

cURL
curl -X GET https://api.memorysync.io/org/billing/current-plan \
-H "Authorization: Bearer $MEMORYSYNC_KEY"
javascript
import { MemorySync } from 'memorysync'
const client = new MemorySync({ apiKey: process.env.MEMORYSYNC_KEY })
const result = await client.request({
method: 'GET',
path: '/org/billing/current-plan',
})
console.log(result)
python
from memorysync import Client
client = Client(api_key=os.environ["MEMORYSYNC_KEY"])
result = client.request(
method="GET",
path="/org/billing/current-plan",
)
print(result)

Behavior & notes

Companion routes: GET /org/billing/usage, GET /org/billing/invoices, GET /org/billing/alerts, GET /org/billing/tax. Plan changes apply through POST /org/billing/scheduled-plans at the start of the next period.