Soft Deletion
WatchEye preserves a record of every entity, program, monitor, note and related artefact for compliance and audit purposes. To make that possible, all DELETE endpoints in the API are soft deletes rather than physical deletes.
What "soft-deleted" means
A soft-deleted record is hidden from both the API and the portal but remains in the database:
- The record is no longer returned by
GETlist endpoints. - The record's individual
GET /<resource>/{uuid}endpoint returns404 Not Found. POST/PATCHcalls that reference the record by UUID return404 Not Found.- Where a record has dependents (e.g. deleting a program also soft-deletes its entities, checks, ID checks, reports, events and notes), the dependent records are hidden in the same way.
- The original
DELETEcall returns the deleted record's representation once as confirmation. Subsequent calls return404.
Recovery window
Soft-deleted records can be restored within 30 days of deletion. Restoration is currently a portal-only action: a user with the account manager role can navigate to the relevant list (e.g. Programs, Entities, Monitors), apply the "Show deleted" filter, open the record and choose Restore. There is no API equivalent of the restore action.
After the 30-day window, soft-deleted records are eligible for permanent removal and may be purged from the database without notice. Once purged, the record and its UUID cannot be recovered.
If you need to retain a record beyond 30 days but no longer want it surfaced in your normal workflows, archive it instead of deleting it (where the resource supports archiving) or use the appropriate status / flags fields to mark it as inactive.
What is and isn't soft-deleted
| Endpoint | Behaviour |
|---|---|
DELETE /v1/programs/{uuid} |
Soft-deletes the program and cascades to every dependent record |
DELETE /v1/entities/{uuid} |
Soft-deletes the entity and its dependent records |
DELETE /v1/monitors/{uuid} |
Soft-deletes the monitor (no dependent records) |
DELETE /v1/notes/{uuid} |
Soft-deletes the note (no dependent records) |
DELETE /v1/adhoc-checks/{uuid} |
Soft-deletes the adhoc check; for a group check, its child checks are deleted alongside it |
DELETE /v1/adhoc-id-checks/{uuid} |
Soft-deletes the adhoc ID check (no dependent records) |
PATCH calls that change a status field (e.g. program.status = "paused", monitor.status = "paused") are not deletions; the affected record remains fully visible via the API.
Prefer archiving over deletion for compliance
If you only need to take a record out of day-to-day workflows but must keep it accessible for compliance, audit or historical reporting, archive it instead of deleting it. Archived records are not subject to the 30-day recovery window - they are retained indefinitely.
The differences:
| Soft delete | Archive | |
|---|---|---|
| Returned by list / show endpoints | No - 404 on the UUID |
Yes (filterable via the archived query parameter) |
| PDF / export still possible | No | Yes |
| Counts towards data-retention quotas | No | Yes |
| Recovery window | 30 days, then eligible for permanent removal | Indefinite - the record is never auto-purged |
| Intended use case | The record was created in error or is no longer relevant | The record should be retained but is no longer in active use |
Archive support per resource:
| Resource | How to archive via API | API surfaces archive state? | Filter by archive state via API? |
|---|---|---|---|
| Entity | POST /v1/entities/{uuid}/archive (and POST /v1/entities/{uuid}/unarchive to restore) |
Yes (archived_at field) |
Yes (?archived=true / ?archived=false) |
| Check | Inherited from the parent entity - archive the entity to archive its checks alongside it | Yes (archived_at field) |
Yes (?archived=true / ?archived=false) |
| Event | Inherited from the parent entity - archive the entity to archive its events alongside it | Yes (archived_at field) |
Yes (?archived=true / ?archived=false) |
| Note | Inherited from the parent entity - archive the entity to archive its notes alongside it | Yes (archived_at field) |
Yes (?archived=true / ?archived=false) |
Archiving an entity also cascades to its identification checks and reports. Checks, events and notes do not have a per-record archive action - their archive state always follows the entity they belong to. Programs do not support archiving; if you need to take a program out of day-to-day workflows you can set its status to paused (scheduled monitor runs and event report emails will skip paused programs).
Reference numbers and soft-deleted entities
Entity reference_number values must be unique among non-deleted entities in the same program. Soft-deleted entities are excluded from that check.
Example: you DELETE an entity with reference_number = "00-000-001". While that record remains soft-deleted (including throughout the 30-day recovery window), you may POST a new entity in the same program with reference_number = "00-000-001". The API accepts the create because the deleted row no longer counts toward uniqueness.
The same reference_number may also be used on a different program while the soft-deleted copy still exists, because uniqueness is scoped per program.
After the recovery window, the soft-deleted record may be purged. Whether or not it has been purged, creating a new entity with that reference_number in the same program remains valid as long as no other non-deleted entity in that program already uses it.
Implications for integrators
- Treat a
404on a UUID you previously saw as "the record may have been deleted" rather than "the UUID was never valid". The 30-day recovery window gives you time to coordinate with the account owner if the deletion was unintended. - For how
reference_numberinteracts with soft deletes, see Reference numbers and soft-deleted entities above. - If you need a confirmed-permanent removal (for example to satisfy a customer's data-erasure request), contact the Global Data support team. Permanent removal is a manual operation handled outside the API.