# Create an event
Source: https://docs.lomi.africa/api/events/EventsApiController_create

Create an event

***

title: "Create an event"
description: "Create an event"
full: true
method: post
path: /events
operationId: EventsApiController\_create
----------------------------------------

## Overview

Publishes an event and returns the desk. Requires Ticketing and Idempotency-Key.

## 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`

## Request

Send `Idempotency-Key`. A retry with the same key does not create a second event.

### Request body

| Field          | Required | Type      | Description |
| -------------- | -------- | --------- | ----------- |
| `title`        | Yes      | `string`  | -           |
| `price_amount` | Yes      | `integer` | -           |
| `capacity`     | Yes      | `integer` | -           |
| `starts_at`    | No       | `string`  | -           |
| `venue`        | No       | `string`  | -           |
| `ticket_name`  | No       | `string`  | -           |
| `currency`     | No       | `string`  | -           |

## Responses

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

## Errors

**403** means Ticketing is off. **401** means the API key is missing or invalid. **429** means too many requests.

## Example

```bash
curl -sS -X POST "https://sandbox.api.lomi.africa/events" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: evt-1" \
  -d '{"title":"Night market","price_amount":5000,"capacity":200}'
```

## OpenAPI

* **operationId**: `EventsApiController_create`
* **Operation**: `POST /events`
