You will receive the base URL when you get an API key. The examples below use BASE_ENDPOINT as a placeholder for that URL.
POST /v1/events/upcoming
Returns a user’s upcoming events.
Request
Send a JSON body with the user ID and your API key:
| Field | Type | Description |
|---|
_id | string | The user ID. |
key | string | Your API key. |
{
"_id": "userId",
"key": "apikey"
}
Response
Each event in the response includes:
| Field | Description |
|---|
eventId | Document ID (doc.id). |
url | Event URL, e.g. https://peerpop.io/events/{specialId}. |
flyer | Flyer image URL. |
title | Event title. |
date | Event date. |
time | Event time. |
address | Event address. |
venue | Venue name, or false if not set. |
organizer | Organizer (self or main co-host). |
live | Whether the event is live. |
Example
curl -X POST "BASE_ENDPOINT/v1/events/upcoming" \
-H "Content-Type: application/json" \
-d '{"_id": "userId", "key": "apikey"}'
POST /v1/events/past
Returns a user’s past events.
Request
Same as upcoming: send a JSON body with the user ID and your API key:
| Field | Type | Description |
|---|
_id | string | The user ID. |
key | string | Your API key. |
{
"_id": "userId",
"key": "apikey"
}
Response
Same shape as upcoming events:
| Field | Description |
|---|
eventId | Document ID (doc.id). |
url | Event URL, e.g. https://peerpop.io/events/{specialId}. |
flyer | Flyer image URL. |
title | Event title. |
date | Event date. |
time | Event time. |
address | Event address. |
venue | Venue name, or false if not set. |
organizer | Organizer (self or main co-host). |
live | Whether the event is live. |
Example
curl -X POST "BASE_ENDPOINT/v1/events/past" \
-H "Content-Type: application/json" \
-d '{"_id": "userId", "key": "apikey"}'