Fetch Calendar Events
Retrieve all calendar events for the authenticated user. Returns past, present, and future events with all properties.
POST
https://api-v3.sweeppea.com/calendar/fetch
Description
This endpoint retrieves all calendar events associated with the authenticated user. Events are returned sorted by start date in ascending order, including past, present, and future events with all their properties.
Authentication
This endpoint requires Bearer token authentication via the Authorization header.
Code Examples
curl -X POST "https://api-v3.sweeppea.com/calendar/fetch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
const response = await fetch('https://api-v3.sweeppea.com/calendar/fetch', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://api-v3.sweeppea.com/calendar/fetch"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.json())
Response
{
"Response": true,
"Data": {
"TotalEvents": 2,
"Events": [
{
"_id": "68df07e9896a685bf51d58cf",
"EventToken": "uuid-v4-string",
"SweepstakesToken": "uuid-v4-string",
"CreationDate": "2025-10-02T23:16:57.491Z",
"Type": "start",
"EventLinkedToken": null,
"EventTitle": "Sweepstakes Launch",
"EventDescription": "Launch of new sweepstakes campaign",
"EventLocation": "Online",
"Latitude": null,
"Longitude": null,
"EventURL": "https://example.com",
"EventStartDate": "2025-10-15T00:00:00.000Z",
"EventStartTime": "09:00",
"EventEndDate": "2025-10-15T00:00:00.000Z",
"EventEndTime": "17:00",
"EventColor": "#6CD9FF",
"EventAllDay": false,
"PeopleInvolved": [],
"EventStatus": true,
"EventTimeZone": "America/New_York",
"PrivateEvent": false,
"RepeatThisEvent": {},
"Notification": {},
"SMSNotification": false,
"Automation": null,
"CreatedByAdmin": false,
"SerieToken": null,
"ChecklistId": null,
"Completed": false
}
]
}
}
Error Responses
{
"Response": false,
"Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
"Code": 401
}
{
"Response": false,
"Message": "Invalid API token. It does not match any account.",
"Code": 403
}
{
"Response": false,
"Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
"Code": 500
}