Skip to main content
POST
Set App Data
Creates or replaces one record of your app’s key/value storage. Use it for small app state — per-store settings, OAuth state, idempotency markers — when you don’t want to run your own database.
App data is authenticated with your app’s client credentials, not a store’s access token — so your app can read what it stored (for example a store’s access token) before it has a token to use:
Records are private to your app. storeId is a partition you choose: pass the store’s id to keep a record per store, or omit it for app-wide records.

Request

Body Parameters

string
required
The record’s key, up to 512 characters. Writing an existing key (in the same storeId partition) replaces its value.
any
required
Any JSON value, up to 512 KB. To remove a record, use Delete App Data.
string
The store the record belongs to. Omit for an app-wide record.
integer
Expire the record after this many seconds. Expired records are no longer returned; without ttlSeconds the record never expires.

Response

The record under data.record.
string
The record’s key
string
The store partition, or null for an app-wide record
any
The stored JSON value
string
When the record expires (ISO 8601), or null
string
Last write (ISO 8601)

Errors