SET API · SET Close
Approve and sign a week
POST/v1/close/weeks/{week}/approve
Moves a prepared week to signed: SET computes snapshotHash, a SHA-256 over the week's matches chained to priorHash (the previous week's snapshotHash). The approving key must differ from the one that prepared it, and the week before must already be signed.
Path parameters
weekstringrequiredYYYY-Www, a real ISO week such as2026-W33. Anything else answers 404not_found.
Headers
Idempotency-Keystring- Any unique string, so a retry runs once. See Idempotency.
Notes
- SET Close is switched on per deployment; while it is off every
/v1/close/*call answers 403close_off. CheckGET /v1/capabilities(features.close). - Needs a key with the
approvescope, andreadas well;writeis not needed. A key withoutapproveanswers 403scope_missing. - The second approver must be a different key (or person): the key that prepared the week, or one rotated from or to it, answers 409
same_approver. - Weeks are signed in order: 409
prior_week_openwhile the week before is not signed. Close's first week needs no prior week. - 409
week_not_prepareduntil the week is prepared. - If an exception appeared in the week after it was prepared, the call answers 409
open_exceptionsand the week is open again; prepare it again once resolved. - 409
week_changedif a match in the week's months was written while it was being signed; read the week and approve again. - A week is signed, not locked: its month can still change until the month locks, and
GET /v1/close/weeks/{week}/verifynames what changed. - Emits the event
close.week.signed. - The example was made with a second key holding the scopes
read approve. - This example is a recorded run of SET's own code (wallet release
e9b03447) with a sandbox key; ids and times are that run's.
Errors
403 close_off404 not_found409 week_not_ended409 before_start_week409 week_signed409 week_not_prepared409 same_approver409 prior_week_open409 week_changed403 scope_missing