Prebit Developer Docs

Extension Storage

Small namespaced key-value storage — not a database.

Not a general datastore

Extension Storage exists for small, namespaced values a Prebit-rendered surface needs without a round-trip to your server — configuration, cache, a "4.6★, 128 reviews" summary read at render time — the same role Shopify's metafields play. Your app's real data (a review's full text, images, moderation queue, search index) lives in your own database. Prebit never stores it.

Gated by the can_write_extension_storage capability (both reads and writes) — capability, not scope, since this is your own app's storage, not merchant store data.

Quota

LimitValue
Max value size16KB
Max total bytes per installation512KB
Max keys per installation200

Enforced at write time, not just documented — a write that would exceed either limit is rejected.

Get a value

const { value } = await client.getExtensionData("reviews", "product_123_summary");
curl "https://admin.prebit.in/api/platform/v1/app-data/reviews?key=product_123_summary" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

List every key in a namespace

const { items } = await client.listExtensionData("reviews");

GET /platform/v1/app-data/:namespace with no key query param returns every key your installation has stored there.

Set a value

await client.putExtensionData("reviews", "product_123_summary", { rating: 4.6, count: 128 }, 3600);

The fourth argument (ttlSeconds) is optional — omit it for a value with no expiry.

Delete a value

await client.deleteExtensionData("reviews", "product_123_summary");

Errors

StatusCause
400key is required (PUT/DELETE)
422Write rejected: value_too_large, quota_bytes_exceeded, or quota_keys_exceeded

On this page