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.
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 _ -.
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 . _ : @ -.
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.
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.
objectstring —sealed_record_envelope.idstring — the client's record id.kindstring —sessionorfavourites.schema_versioninteger — as the last accepted write sent it.revisioninteger — server-assigned; rises by 1 on every accepted write.created_atstring — when the record was created (ISO 8601 UTC).last_touched_atstring — set by the server on every accepted write. Sort by it, ties byid.deletedboolean — whether the record is a tombstone.deleted_atstring or null — when it was deleted.device_idstring — the device of the last accepted write.payload_bytesinteger or null — the decoded payload size;nullfor 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.
| Status | Code | When |
|---|---|---|
| 401 | AUTHENTICATION_REQUIRED | No access token, or one that is not valid. |
| 403 | SEALED_STORE_PERSONAL_SESSION_REQUIRED | The call used an API key or a service account. Only a person's own sign-in session reaches a sealed store. |
| 404 | SEALED_STORE_NOT_FOUND | No store with that name (details.store). |
| 404 | SEALED_RECORD_NOT_FOUND | No record with that id in the caller's store, or its tombstone has passed the 30-day retention. |
| 409 | SEALED_OPERATION_IN_PROGRESS | An earlier call with this Idempotency-Key has not finished. Retry in a moment. |
| 409 | SEALED_RECORD_DELETED | The record is already deleted. This wins over a stale revision. details.current is the tombstone. |
| 409 | SEALED_RECORD_REVISION_CONFLICT | revision is not the record's current revision. details.current is the record as it is now. |
| 422 | SEALED_IDEMPOTENCY_KEY_REQUIRED | No Idempotency-Key header. |
| 422 | SEALED_IDEMPOTENCY_KEY_INVALID | The Idempotency-Key is not 16 to 128 printable ASCII characters without spaces. |
| 422 | SEALED_IDEMPOTENCY_KEY_REUSED | The Idempotency-Key was already used for a different call. Mint a new one for a new change. |
| 422 | VALIDATION_ERROR | revision or device_id is missing or invalid, or record_id does not match its pattern. |
- Bash
- Python
- JavaScript
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
}