Sweeppea API v3

Update Calendar Event

Update a specific calendar event by EventToken. The event must belong to the authenticated user.

PUT https://api-v3.sweeppea.com/calendar/update

Description

This endpoint updates a calendar event by its EventToken. Only specific fields can be updated. The event must belong to the authenticated user.

Important: Events cannot be updated to the past. If updating EventStartDate or EventStartTime, the new date/time must be in the future.

Authentication

This endpoint requires Bearer token authentication via the Authorization header.

Request Body

{
  "EventToken": "uuid-v4-string",
  "EventTitle": "Updated Event Title",
  "EventDescription": "Updated description",
  "EventLocation": "New York, USA",
  "Latitude": "40.7128",
  "Longitude": "-74.0060",
  "EventURL": "https://example.com/event",
  "EventStartDate": "2026-02-15T00:00:00.000Z",
  "EventStartTime": "09:00",
  "EventEndDate": "2026-02-15T00:00:00.000Z",
  "EventEndTime": "17:00",
  "EventColor": "#6CD9FF",
  "EventAllDay": false,
  "EventStatus": true,
  "PrivateEvent": false,
  "SMSNotification": false,
  "Completed": false
}
Required Parameters
Parameter Type Description
EventToken string UUID v4 format of the calendar event
Optional Parameters (Updatable Fields)
Parameter Type Description
EventTitle string Event title
EventDescription string Event description
EventLocation string Event location
Latitude string Location latitude
Longitude string Location longitude
EventURL string Event URL
EventStartDate string Start date (ISO 8601)
EventStartTime string Start time (HH:mm)
EventEndDate string End date (ISO 8601)
EventEndTime string End time (HH:mm)
EventColor string Event color (hex)
EventAllDay boolean All day event flag
EventStatus boolean Event status (busy/free)
PrivateEvent boolean Private event flag
SMSNotification boolean SMS notification flag
Completed boolean Completion status

Code Examples

curl -X PUT "https://api-v3.sweeppea.com/calendar/update" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "EventToken": "cf1b198f-5c58-4bc6-b944-f466d3e38bc7",
    "EventTitle": "Updated Event Title",
    "EventColor": "#FF5733"
  }'

Response

{
  "Response": true,
  "Message": "Calendar Event Updated Successfully",
  "Data": {
    "_id": "68df07e9896a685bf51d58cf",
    "EventToken": "uuid-v4-string",
    "EventTitle": "Updated Event Title",
    "EventDescription": "Updated description",
    "EventColor": "#FF5733",
    ...
  }
}

Error Responses

{
  "Response": false,
  "Message": "EventToken is Required",
  "Help": {
    "ExpectedBody": {
      "EventToken": "string (required) \u2014 UUID v4 of the calendar event",
      "EventTitle": "string (optional) \u2014 new title",
      "EventStartDate": "string (optional) \u2014 new start date, YYYY-MM-DD",
      "EventEndDate": "string (optional) \u2014 new end date, YYYY-MM-DD. Cannot be moved into the past",
      "EventStartTime": "string (optional) \u2014 new start time, HH:MM (24-hour)",
      "EventEndTime": "string (optional) \u2014 new end time, HH:MM (24-hour)",
      "EventAllDay": "boolean (optional) \u2014 all-day event",
      "EventDescription": "string (optional) \u2014 new description",
      "EventLocation": "string (optional) \u2014 new location",
      "EventURL": "string (optional) \u2014 new related URL",
      "EventColor": "string (optional) \u2014 new colour",
      "EventStatus": "string (optional) \u2014 new status",
      "Completed": "boolean (optional) \u2014 mark the event as completed",
      "PrivateEvent": "boolean (optional) \u2014 mark the event as private",
      "SMSNotification": "boolean (optional) \u2014 send an SMS notification",
      "Latitude": "number (optional) \u2014 latitude of the location",
      "Longitude": "number (optional) \u2014 longitude of the location"
    }
  },
  "Code": 400
}
{
  "Response": false,
  "Message": "Cannot Update Events To The Past",
  "Help": {
    "ExpectedBody": {
      "EventToken": "string (required) \u2014 UUID v4 of the calendar event",
      "EventTitle": "string (optional) \u2014 new title",
      "EventStartDate": "string (optional) \u2014 new start date, YYYY-MM-DD",
      "EventEndDate": "string (optional) \u2014 new end date, YYYY-MM-DD. Cannot be moved into the past",
      "EventStartTime": "string (optional) \u2014 new start time, HH:MM (24-hour)",
      "EventEndTime": "string (optional) \u2014 new end time, HH:MM (24-hour)",
      "EventAllDay": "boolean (optional) \u2014 all-day event",
      "EventDescription": "string (optional) \u2014 new description",
      "EventLocation": "string (optional) \u2014 new location",
      "EventURL": "string (optional) \u2014 new related URL",
      "EventColor": "string (optional) \u2014 new colour",
      "EventStatus": "string (optional) \u2014 new status",
      "Completed": "boolean (optional) \u2014 mark the event as completed",
      "PrivateEvent": "boolean (optional) \u2014 mark the event as private",
      "SMSNotification": "boolean (optional) \u2014 send an SMS notification",
      "Latitude": "number (optional) \u2014 latitude of the location",
      "Longitude": "number (optional) \u2014 longitude of the location"
    }
  },
  "Code": 400
}
{
  "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": "Calendar Event Not Found",
  "Code": 404
}
{
  "Response": false,
  "Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
  "Code": 500
}
© Sweeppea. All rights reserved.