# Add a ticket type
Source: https://docs.lomi.africa/api/events/EventsApiController_addType

Add a ticket type

***

title: "Add a ticket type"
description: "Add a ticket type"
full: true
method: post
path: /events/{id}/types
operationId: EventsApiController\_addType
-----------------------------------------

## Overview

Adds a named ticket or pack. seats is how many QR codes one sale issues. capacity is how many of that type can be sold. Requires Ticketing.

## Authentication

Merchant routes require an API key in the `X-API-KEY` header. Use a test key against `https://sandbox.api.lomi.africa` and a live key against `https://api.lomi.africa`.

## Endpoint

`POST /events/{id}/types`

## Request

### Path parameters

| Name | Required | Schema   | Description |
| ---- | -------- | -------- | ----------- |
| `id` | Yes      | `string` | Event id    |

### Request body

`seats` is how many QR codes one sale issues. `capacity` is how many of that type can be sold.

| Field          | Required | Type      | Description |
| -------------- | -------- | --------- | ----------- |
| `name`         | Yes      | `string`  | -           |
| `price_amount` | Yes      | `integer` | -           |
| `capacity`     | Yes      | `integer` | -           |
| `currency`     | No       | `string`  | -           |
| `seats`        | No       | `integer` | -           |

## Responses

| Status | Description      |
| ------ | ---------------- |
| `200`  | Success          |
| `403`  | Ticketing is off |

## Errors

**403** means Ticketing is off. **401** means the API key is missing or invalid. **404** means this event is not in the organization. **429** means too many requests.

## Example

```bash
curl -sS -X POST "https://sandbox.api.lomi.africa/events/evt_EXAMPLE/types" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"General","price_amount":5000,"capacity":100}'
```

## OpenAPI

* **operationId**: `EventsApiController_addType`
* **Operation**: `POST /events/{id}/types`
