Events

Create and manage events with ticket sales.

GET/v1/events

Retrieve a list of events.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20)
statusstringFilter: draft, published, cancelled, completed
upcomingbooleanOnly 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/events

Create a new event.

Request Body

FieldTypeRequiredDescription
namestringYesEvent name
start_datestringYesStart date/time (ISO 8601)
end_datestringYesEnd date/time (ISO 8601)
venuestringNoVenue name
ticket_typesarrayNoArray 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/:id

Retrieve 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/:id

Update 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"
  }'