Create a discount code
tito_create_discount_codeCreate a discount code for an event. type is PercentOffDiscountCode (value = percent) or MoneyOffDiscountCode (value = flat amount off per ticket, in the event currency). Undo by editing it (e.g. quantity or end_at) with tito_update_discount_code. Tito: POST /:account/:event/discount_codes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code attendees enter, e.g. SAVE10. | |
| type | Yes | PercentOffDiscountCode = percentage off; MoneyOffDiscountCode = flat amount off per ticket. | |
| value | Yes | The amount off per ticket as a decimal string, e.g. "10.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. | |
| 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. |