Delete Program
Deletes a program using a two-stage pattern: soft delete first, then permanent removal on a second call.
Last updated: October 26, 2026
DELETE /siren/v1/programs/{id}
Uses a two-stage delete pattern:
- First DELETE. If the program’s status is not
deleted, performs a soft delete by settingstatustodeleted. Returns200with the updated record. - Second DELETE. If the program’s status is already
deleted, permanently removes the record from the database. Returns204 No Content.
The second DELETE is refused while the program has an obligation that is draft or approved, or one of its obligations sits in a payout that isn’t marked paid. Nothing is removed, and the message reads “This program cannot be permanently deleted because it still has …. Settle or cancel them first.”
Error Responses:
404. No record found with that ID.409. Money is still owed.500. Database error.
Events: Broadcasts ProgramActionEvent (action: Delete) after success.
Check before deleting
GET /siren/v1/programs/{id}/deletion-blockers says whether the program can be deleted permanently now, without deleting it. It answers 200 with canDeletePermanently, blockers (each with key, count, and label), and summary, or 404 for an unknown ID. It needs permission to delete programs.