# Publish an event
Source: https://docs.lomi.africa/api/events/EventsApiController_publish

Publish an event

***

title: "Publish an event"
description: "Publish an event"
full: true
method: post
path: /events/{id}/publish
operationId: EventsApiController\_publish
-----------------------------------------

## Overview

Requires Ticketing. Omit published or send true to publish. Send published false to take the page down.

## 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}/publish`

## Request

### Path parameters

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

### Request body

Omit the body, or send `published: true`, to publish. Send `published: false` to take the page down.

| Field       | Required | Type      | Description |
| ----------- | -------- | --------- | ----------- |
| `published` | No       | `boolean` | -           |

## 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/publish" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: evt-1"
```

## OpenAPI

* **operationId**: `EventsApiController_publish`
* **Operation**: `POST /events/{id}/publish`
