Events
Create and manage events with ticket sales.
GET
/v1/eventsRetrieve a list of events.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20) |
status | string | Filter: draft, published, cancelled, completed |
upcoming | boolean | Only show upcoming events |
Request
bash
curl -X GET "https://api.peeap.com/api/v1/events?upcoming=true" \
-H "X-API-Key: sk_live_your_api_key"Response
json
{
"success": true,
"data": [
{
"id": "evt_abc123",
"name": "Tech Conference 2025",
"description": "Annual technology conference",
"venue": "Convention Center",
"address": "123 Main St, Freetown",
"start_date": "2025-03-15T09: 00: 00.000Z",
"end_date": "2025-03-15T18: 00: 00.000Z",
"status": "published",
"ticket_types": [
{
"id": "tt_xyz789",
"name": "General Admission",
"price": 50.00,
"quantity_available": 500,
"quantity_sold": 125
},
{
"id": "tt_def456",
"name": "VIP",
"price": 150.00,
"quantity_available": 50,
"quantity_sold": 20
}
],
"total_tickets_sold": 145,
"created_at": "2025-01-10T08: 00: 00.000Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 12,
"has_next_page": false
}
}POST
/v1/eventsCreate a new event.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Event name |
start_date | string | Yes | Start date/time (ISO 8601) |
end_date | string | Yes | End date/time (ISO 8601) |
venue | string | No | Venue name |
ticket_types | array | No | Array of ticket types |
Request
bash
curl -X POST "https://api.peeap.com/api/v1/events" \
-H "X-API-Key: sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Music Festival",
"description": "A day of live music and entertainment",
"venue": "National Stadium",
"address": "Freetown, Sierra Leone",
"start_date": "2025-07-20T14:00:00.000Z",
"end_date": "2025-07-20T23:00:00.000Z",
"ticket_types": [
{
"name": "General Admission",
"price": 75.00,
"quantity_available": 1000
},
{
"name": "VIP Access",
"price": 200.00,
"quantity_available": 100
}
]
}'GET
/v1/events/:idRetrieve a single event by ID.
bash
curl -X GET "https://api.peeap.com/api/v1/events/evt_abc123" \
-H "X-API-Key: sk_live_your_api_key"PATCH
/v1/events/:idUpdate an existing event.
bash
curl -X PATCH "https://api.peeap.com/api/v1/events/evt_abc123" \
-H "X-API-Key: sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"venue": "New Location Arena",
"status": "published"
}'