> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplepay.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a booking event type

> Referencia detallada para POST /v1/bookable-payments/event_types.

## Uso

Usalo dentro de Bookable Payments para modelar inventario reservado, calcular disponibilidad, crear holds, convertirlos en checkout y confirmar bookings.

## Antes de llamar

| Tema             | Detalle                                                                                |
| ---------------- | -------------------------------------------------------------------------------------- |
| Metodo           | `POST`                                                                                 |
| Ruta             | `/v1/bookable-payments/event_types`                                                    |
| Auth             | Bearer API key del ambiente correcto.                                                  |
| Scope            | `availability:write`                                                                   |
| Idempotencia     | Recomendada para cualquier retry. Usa una key deterministica por operacion de negocio. |
| Guia relacionada | [Bookable Payments](/bookable-payments/overview)                                       |

## Patron recomendado

* Ejecuta este endpoint desde backend o job seguro, nunca desde frontend con API keys.
* Manda `Idempotency-Key` cuando el endpoint cree, convierta, reprograme, cancele, capture o reembolse estado.
* Confirma inventario final con `booking.confirmed` o una lectura de booking, no solo con una URL de retorno.
* Consulta el bloque OpenAPI de esta pagina para el shape exacto de parametros, body y respuestas.

## Ejemplo minimo

```bash terminal theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS -X POST "https://api.simplepay.mx/v1/bookable-payments/event_types" \
  -H "Authorization: Bearer $SIMPLEPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-booking-event-type_v1" \
  -d '{ ... }'
```

## Errores a manejar

* `400` indica payload, parametros o estado invalido.
* `401` o `403` indican API key, ambiente o scopes incorrectos.
* `409` suele indicar conflicto de estado, duplicado o idempotencia incompatible.
* `429` y `5xx` se pueden reintentar con backoff; en writes conserva la misma idempotency key.

## Contrato OpenAPI

El playground, parametros, body y respuestas de abajo salen de `/openapi.json`. Si el contrato cambia, actualiza la spec y regenera esta pagina.


## OpenAPI

````yaml openapi.json POST /v1/bookable-payments/event_types
openapi: 3.1.0
info:
  title: SimplePay API
  version: '2026-06-13'
servers:
  - url: https://api.simplepay.mx
security:
  - SimplePayApiKey: []
paths:
  /v1/bookable-payments/event_types:
    post:
      summary: Create a booking event type
      operationId: createBookingEventType
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/BookingEventTypeCreate'
              required:
                - duration_minutes
                - title
      responses:
        '201':
          description: Booking event type created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BookingEventType'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 255
  schemas:
    BookingEventTypeCreate:
      type: object
      properties:
        active:
          type: boolean
        booking_form_fields:
          type: array
          items:
            type: object
            additionalProperties: true
        booking_window_days:
          type:
            - integer
            - 'null'
          minimum: 1
        buffer_after_minutes:
          type: integer
          minimum: 0
        buffer_before_minutes:
          type: integer
          minimum: 0
        cancellation_policy:
          type: object
          additionalProperties: true
        capacity:
          type: integer
          minimum: 1
        confirmation_policy:
          enum:
            - automatic
            - manual
            - payment_required
        default_price_id:
          type:
            - string
            - 'null'
          format: uuid
        description:
          type:
            - string
            - 'null'
        duration_choices_minutes:
          type: array
          items:
            type: integer
            minimum: 1
        duration_minutes:
          type: integer
          minimum: 1
        inventory_mode:
          enum:
            - capacity_pool
            - date_range
            - instant
            - seated
            - unit_assignment
        kind:
          enum:
            - appointment
            - class
            - scheduled_offer
            - experience
            - rental
            - service
            - date_range
        maximum_quantity:
          type:
            - integer
            - 'null'
          minimum: 1
        metadata:
          type: object
          additionalProperties: true
        minimum_notice_minutes:
          type: integer
          minimum: 0
        minimum_quantity:
          type: integer
          minimum: 1
        payment_config:
          type: object
          additionalProperties: true
        payment_requirement:
          enum:
            - deposit
            - none
            - optional
            - required
        product_id:
          type:
            - string
            - 'null'
          format: uuid
        resource_ids:
          type: array
          items:
            type: string
            format: uuid
        reschedule_policy:
          type: object
          additionalProperties: true
        schedule_ids:
          type: array
          items:
            type: string
            format: uuid
        slug:
          type: string
          pattern: ^[a-z0-9][a-z0-9-]{1,120}$
        slot_interval_minutes:
          type: integer
          minimum: 1
        time_zone:
          type: string
        title:
          type: string
          minLength: 1
      additionalProperties: true
    BookingEventType:
      type: object
      properties:
        active:
          type: boolean
        bookingFormFields:
          type: array
          items:
            type: object
            additionalProperties: true
        bookingWindowDays:
          type: integer
          minimum: 1
        bufferAfterMinutes:
          type: integer
          minimum: 0
        bufferBeforeMinutes:
          type: integer
          minimum: 0
        cancellationPolicy:
          type: object
          additionalProperties: true
        capacity:
          type: integer
          minimum: 1
        confirmationPolicy:
          enum:
            - automatic
            - manual
            - payment_required
        defaultPrice:
          type: object
          properties:
            amount:
              type: integer
              minimum: 0
            currency:
              type: string
              pattern: ^[a-z]{3}$
            id:
              type: string
              format: uuid
        defaultPriceId:
          type: string
          format: uuid
        description:
          type: string
        durationChoicesMinutes:
          type: array
          items:
            type: integer
            minimum: 1
        durationMinutes:
          type: integer
          minimum: 1
        id:
          type: string
          format: uuid
        inventoryMode:
          enum:
            - capacity_pool
            - date_range
            - instant
            - seated
            - unit_assignment
        kind:
          enum:
            - appointment
            - class
            - scheduled_offer
            - experience
            - rental
            - service
            - date_range
        maximumQuantity:
          type: integer
          minimum: 1
        metadata:
          type: object
          additionalProperties: true
        minimumNoticeMinutes:
          type: integer
          minimum: 0
        minimumQuantity:
          type: integer
          minimum: 1
        object:
          const: booking_event_type
        paymentConfig:
          type: object
          additionalProperties: true
        paymentRequirement:
          enum:
            - deposit
            - none
            - optional
            - required
        product:
          type: object
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
        productId:
          type: string
          format: uuid
        reschedulePolicy:
          type: object
          additionalProperties: true
        slug:
          type: string
        slotIntervalMinutes:
          type: integer
          minimum: 1
        timeZone:
          type: string
        title:
          type: string
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    SimplePayApiKey:
      type: http
      scheme: bearer

````