# Attendees and ticketing

Attendees, registrations, session sign-up, ticket types, orders and check-in.

Base URL: https://api.audiobly.com

### POST /v1/events/{event_id}/promo-codes

Create promo code

Create a promo code (percentage or fixed discount, optionally limited to one ticket type,
a validity window and a redemption cap). 409 DUPLICATE_CODE if the code already exists for
this event; 403 MODULE_DISABLED without Experience.

Scope: prep_manage

Parameters:

- `event_id` (path, string, required)

Body (JSON):

- `code` (string, required): The code attendees type at checkout.
- `discount_type` (string): Either percentage or fixed.
- `discount_value` (number): The discount amount: a percentage, or a fixed amount in major units, as set by discount_type.
- `ticket_type_id` (string (uuid)): The ticket type this applies to; leave out for all ticket types.
- `valid_from` (string (date-time)): When the code starts working.
- `valid_until` (string (date-time)): When the code stops working.
- `max_redemptions` (integer): How many times the code can be used; leave out for unlimited.

Responses:

- 201: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.
