Skip to content

Delete a sealed record

Soft-deletes a record. It becomes an envelope-only tombstone: it appears in the change feed and the deleted list, and it can be undeleted for 30 days, after which it is removed for good. Its content is kept until then, so an undelete restores it.

A store keeps its newest 500 tombstones. A delete past that removes the store's oldest tombstone at once, before its 30 days are up, and feed cursors from before that removal are then refused with 410 SEALED_CURSOR_EXPIRED.

The delete names the revision it was read at in the revision query parameter. A stale one is 409 SEALED_RECORD_REVISION_CONFLICT, and an already deleted record 409 SEALED_RECORD_DELETED; both carry the record as it is now in error.details.current.

Requires an Idempotency-Key header: re-sending the same key answers the first call's exact response (header Idempotent-Replayed: true) and changes nothing; a refused call is not remembered, so it may be retried with the same key.

DELETEhttps://api.aitronos.com/v1/sealed-stores/{store}/records/{record_id}

Path Parameters

store string required

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

record_id string required

The record's id, as the client minted it: 16 to 128 characters of A-Z a-z 0-9 _ -.

Query Parameters

revision integer required

The revision this delete was based on. At least 1.

device_id string required

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

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.


Returns

200 OK with the tombstone's envelope: deleted is true, deleted_at is set, payload_bytes is null, and device_id is the deleting device.

  • object string — sealed_record_envelope.
  • id string — the client's record id.
  • kind string — session or favourites.
  • schema_version integer — as the last accepted write sent it.
  • revision integer — server-assigned; rises by 1 on every accepted write.
  • created_at string — when the record was created (ISO 8601 UTC).
  • last_touched_at string — set by the server on every accepted write. Sort by it, ties by id.
  • deleted boolean — whether the record is a tombstone.
  • deleted_at string or null — when it was deleted.
  • device_id string — the device of the last accepted write.
  • payload_bytes integer or null — the decoded payload size; null for a tombstone.

There is no copy of the sealed content: get the record or read the change feed for it.

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).
404SEALED_RECORD_NOT_FOUNDNo record with that id in the caller's store, or its tombstone has passed the 30-day retention.
409SEALED_OPERATION_IN_PROGRESSAn earlier call with this Idempotency-Key has not finished. Retry in a moment.
409SEALED_RECORD_DELETEDThe record is already deleted. This wins over a stale revision. details.current is the tombstone.
409SEALED_RECORD_REVISION_CONFLICTrevision is not the record's current revision. details.current is the record as it is now.
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.
422VALIDATION_ERRORrevision or device_id is missing or invalid, or record_id does not match its pattern.
cURL
curl -X DELETE "https://api.aitronos.com/v1/sealed-stores/aitronos-browser/records/vSWmWbg9sDur336pnYgYzQ?revision=2&device_id=1f783def-2aa1-4b44-9c73-3c6b9102c06b" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Idempotency-Key: 604d9e35-d800-493f-bec6-37cceeeb0245"

Response:

{
  "object": "sealed_record_envelope",
  "id": "vSWmWbg9sDur336pnYgYzQ",
  "kind": "session",
  "schema_version": 1,
  "revision": 3,
  "created_at": "2026-10-10T08:41:17.204913Z",
  "last_touched_at": "2026-10-10T09:30:05.551390Z",
  "deleted": true,
  "deleted_at": "2026-10-10T09:30:05.551390Z",
  "device_id": "1f783def-2aa1-4b44-9c73-3c6b9102c06b",
  "payload_bytes": null
}