unassign_code
Take a code back from its participant and make it available again. DESTRUCTIVE: any redemption recorded on that code is cleared along with the assignment, so a redeemed code loses its redemption history. Voided codes are never released. confirm=true is REQUIRED. If the goal is only to reverse a redemption while keeping the participant, use unredeem_code instead — always offer that alternative first. Requires the Codes & Coupons module enabled on the account — on 403 "module not enabled", do NOT retry; tell the user to contact Sweeppea support.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | Yes | Must be true. Set it ONLY after the user explicitly confirmed THIS deletion in this conversation, having been told what is lost: the link between this code and its participant, plus any redemption recorded on it. Never assume, never carry a confirmation over from a previous item, never set it to satisfy the schema. | |
| coupon_token | Yes | The code token (UUID v4) of an assigned code |