API REFERENCE

Storage API

A small key-value store for state your integration needs to keep — sync cursors, dedup keys, cached lookups. Records live under a namespace you name; each is addressed by a key and carries a JSON value, optional metadata, and a revision number.

Write a record

PUT /storage/namespaces/{namespace}/records/{key} creates or replaces a record. The body holds the value (any JSON), optional metadata, and ttlSeconds to expire it. Pass ifRevision to make the write conditional: it only applies if the stored revision still matches, so concurrent writers don't clobber each other.

curl
curl -X PUT \
  https://algapsa.com/api/v1/storage/namespaces/quickbooks-sync/records/last-cursor \
  -H "X-API-Key: $ALGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "value": { "cursor": "2026-06-01T00:00:00Z" },
    "ttlSeconds": 86400,
    "ifRevision": 3
  }'

Read and delete

Fetch one with GET /storage/namespaces/{namespace}/records/{key} and drop it with the matching DELETE. To scan a namespace, use GET /storage/namespaces/{namespace}/records, which pages by cursor and accepts keyPrefix to narrow the result.

Bulk upsert

POST /storage/namespaces/{namespace}/records takes an items array and writes them in one call — each item is the same shape as a single PUT body plus its key. Use it to seed or refresh many records at once.

Endpoints

Every endpoint links through to its full parameters, request and response schemas, and code samples.

GET/api/v1/storage/namespaces/{namespace}/recordsAlgaPSAList records in a namespacePOST/api/v1/storage/namespaces/{namespace}/recordsAlgaPSABulk insert or update recordsGET/api/v1/storage/namespaces/{namespace}/records/{key}AlgaPSAGet a record by keyPUT/api/v1/storage/namespaces/{namespace}/records/{key}AlgaPSACreate or update a record by keyDELETE/api/v1/storage/namespaces/{namespace}/records/{key}AlgaPSADelete a record by key