Update a discount code
tito_update_discount_codeChange an existing discount code — its code, value, quantity, validity window or attached releases. Only the fields you pass are sent. To retire a code without deleting it, set end_at to now. Tito: PATCH /:account/:event/discount_codes/:discount_code_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | New code text. | |
| type | No | New discount type. | |
| value | No | New amount off per ticket as a decimal string, e.g. "15.0". | |
| end_at | No | When the code stops working (ISO 8601 datetime). | |
| quantity | No | How many tickets can use this code in total. | |
| start_at | No | When the code starts working (ISO 8601 datetime). | |
| event_slug | Yes | The event slug (the second part of https://ti.to/<account>/<event>), e.g. 2026. | |
| release_ids | No | Release ids the code applies to (empty = all). | |
| account_slug | No | The account slug (the first part of https://ti.to/<account>/<event>). Optional if TITO_ACCOUNT is set; tito_whoami lists the accounts this token can reach. | |
| reveal_secret | No | Reveal secret releases when the code is applied. Default false. | |
| discount_code_id | Yes | The discount code's numeric id. | |
| only_show_attached | No | When the code is applied, show only the releases attached to it. Default false. | |
| max_quantity_per_release | No | The discount applies to at most this many tickets per release. | |
| min_quantity_per_release | No | The discount applies only if at least this many tickets are selected. |