Skip to content

Archive, restore, and remove records

Archive a record when it should leave active lists but remain recoverable. Anonymisation and permanent deletion have different consequences: choose them only when that is the intended operation, with the relevant delete permissions.

Delete modes:

  • archive (default): soft delete sets the deletedAt property on the record
  • anonymize: removes most data values from the record, preserving only its structure in the database (useful for keeping references to submissions or campaign aggregates while ensuring privacy)
  • delete: Permanently removes the record from the database (hard delete). Once deleted, the record cannot be recovered.
Terminal window
curl -X DELETE "https://v2.api.caraer.com/api/v2/records/RECORD_UUID?mode=archive" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Restore:

Note: The restore endpoint (POST /api/v2/records/{uuid}/restore) can only fully restore records that were archived (soft deleted).

While you can technically call restore for records deleted with anonymize, most data values will not be recovered because they were irreversibly anonymized. Only records deleted with the archive (soft delete) mode can be restored with their original data intact.

Terminal window
curl -X POST "https://v2.api.caraer.com/api/v2/records/RECORD_UUID/restore" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

After an archive or restore, read the record and query the appropriate active or archived list to verify the intended state. See query records.