Skip to content

Create the account key blob

Sets the store's one account-scoped opaque blob, for example the wrapped key a person's devices share. It is create-if-absent: the first create wins (201 Created), and every later create, from any device and however concurrent, answers the stored value unchanged (200 OK). It is never replaced.

So two devices setting up at the same moment both end with the one value that won. Always continue with the blob in the answer, not the one you sent.

At most 2 KiB decoded. Requires an Idempotency-Key header: re-sending the same key answers the first call's exact response (header Idempotent-Replayed: true).

POSThttps://api.aitronos.com/v1/sealed-stores/{store}/account-key

Path Parameters

store string required

The store: aitronos-browser. Up to 64 characters; an unknown store is 404 SEALED_STORE_NOT_FOUND.

Headers

Authorization string required

Bearer <access token> from the person's own sign-in. API keys and service accounts are refused with 403 SEALED_STORE_PERSONAL_SESSION_REQUIRED.

Idempotency-Key string required

A random id minted once for this change and sent again on every retry of it: 16 to 128 printable ASCII characters, no spaces (a UUID works). The first accepted answer is remembered for 30 days; see Idempotency-Key.

Body Parameters

schema_version integer required

The client's schema and sealing version for this value, 1 to 2,147,483,647. Stored and returned as sent; the server never interprets it.

device_id string required

The writing device's id: the device id this device signed in with. 16 to 255 characters of A-Z a-z 0-9 . _ : @ -.

blob string required

The opaque sealed blob, standard padded base64. At least 28 bytes and at most 2 KiB (2,048 bytes) decoded.


Returns

201 Created when this create set the blob, or 200 OK with the blob that was already set, unchanged:

  • object string — sealed_account_key.
  • store string — the store's name.
  • schema_version integer — as the winning create sent it.
  • device_id string — the device whose create won.
  • created_at string — when it was created (ISO 8601 UTC).
  • blob string — the opaque blob, standard padded base64.
  • blob_bytes integer — its decoded size.

Every answer carries the header Idempotent-Replayed: false on the first answer, true when this is the remembered answer to an Idempotency-Key sent before.

Errors

StatusCodeWhen
401AUTHENTICATION_REQUIREDNo access token, or one that is not valid.
403SEALED_STORE_PERSONAL_SESSION_REQUIREDThe call used an API key or a service account. Only a person's own sign-in session reaches a sealed store.
404SEALED_STORE_NOT_FOUNDNo store with that name (details.store).
409SEALED_OPERATION_IN_PROGRESSAn earlier call with this Idempotency-Key has not finished. Retry in a moment.
413SEALED_PAYLOAD_TOO_LARGEblob is over 2 KiB decoded (details.field, details.max_bytes, details.payload_bytes).
422SEALED_IDEMPOTENCY_KEY_REQUIREDNo Idempotency-Key header.
422SEALED_IDEMPOTENCY_KEY_INVALIDThe Idempotency-Key is not 16 to 128 printable ASCII characters without spaces.
422SEALED_IDEMPOTENCY_KEY_REUSEDThe Idempotency-Key was already used for a different call. Mint a new one for a new change.
422SEALED_PAYLOAD_INVALIDblob is not standard padded base64, or decodes to fewer than 28 bytes (details.field).
422VALIDATION_ERRORA body field is missing, of the wrong type or out of range.
cURL
curl -X POST "https://api.aitronos.com/v1/sealed-stores/aitronos-browser/account-key" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Idempotency-Key: a4faefd3-8179-4ddc-b370-3ec2f84116cb" \
  -H "Content-Type: application/json" \
  -d '{
  "schema_version": 1,
  "device_id": "1f783def-2aa1-4b44-9c73-3c6b9102c06b",
  "blob": "UjJN+KrSFlr8YoFmbFpc/hWHZXQdX3UeIEok/wCirsIhs2M6icaZukX/SKS2NUk8+fSjaQCjpqpBVke9hNGGwVulxI6Dg6XNvwr0hmQJClGN0Ihq7ELoXzcko+c="
}'

Response:

{
  "object": "sealed_account_key",
  "store": "aitronos-browser",
  "schema_version": 1,
  "device_id": "1f783def-2aa1-4b44-9c73-3c6b9102c06b",
  "created_at": "2026-10-01T12:03:58.019244Z",
  "blob": "UjJN+KrSFlr8YoFmbFpc/hWHZXQdX3UeIEok/wCirsIhs2M6icaZukX/SKS2NUk8+fSjaQCjpqpBVke9hNGGwVulxI6Dg6XNvwr0hmQJClGN0Ihq7ELoXzcko+c=",
  "blob_bytes": 92
}