# Events

Endpoints for creating, retrieving, and managing events and attendees

## Get public events or user-specific events

 - [GET /api/v1/events](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events/get.md): Returns public events for unauthenticated users, or events for a specific user/owner for authenticated users. Supports filtering by organizer or owner.

## Create a new event

 - [POST /api/v1/events](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events/post.md): Creates a new event with specified details including title, description, date/time, location, and privacy settings. The authenticated user becomes the event organizer.

## Export group's public calendar

 - [GET /api/v1/events/calendar/g/{groupname}.ics](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1calendar~1g~1%7Bgroupname%7D.ics/get.md): Exports a group's non invite-only events as an ICS (iCalendar) file. Only available if the group has enabled public calendar export in their settings.

## Export private calendar

 - [GET /api/v1/events/calendar/p/{id}.ics](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1calendar~1p~1%7Bid%7D.ics/get.md): Exports a user's or group's private calendar using a unique private ID. Events visibility is configured in calendar settings.

## Export user's public calendar

 - [GET /api/v1/events/calendar/u/{username}.ics](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1calendar~1u~1%7Busername%7D.ics/get.md): Exports a user's all non invite-only events as an ICS (iCalendar) file. Only available if the user has enabled public calendar export in their settings.

## Get authenticated user's events

 - [GET /api/v1/events/my](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1my/get.md): Returns events for the authenticated user with various filtering options including past events, organized events, and events pending response.

## Search events

 - [GET /api/v1/events/search](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1search/get.md): Searches events by mode: following, local, or federated (FASP). For local/fasp modes at least one of query, date range, or location filter must be provided. If groupId is not provided search is not restricted by group.

## Get event calendar settings

 - [GET /api/v1/events/settings](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1settings/get.md): Retrieves calendar export settings for the authenticated user or a specified group, including public/private calendar visibility and export options.

## Regenerate private calendar ID

 - [POST /api/v1/events/settings/regeneratePrivateId](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1settings~1regenerateprivateid/post.md): Generates a new unique ID for the private calendar URL. This invalidates the previous private calendar link.

## Update event calendar settings

 - [POST /api/v1/events/settings/update](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1settings~1update/post.md): Updates calendar export settings including public/private calendar visibility, detail level, and export scope.

## Update event details

 - [PUT /api/v1/events/{eventId}](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D/put.md): Updates an existing event's information including title, description, date/time, location, and privacy settings. Only the event organizer can update the event.

## Get event details by ID

 - [GET /api/v1/events/{eventId}](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D/get.md): Retrieves detailed information about a specific event including attendee status, statistics, and optional translations.

## Delete an event

 - [DELETE /api/v1/events/{eventId}](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D/delete.md): Soft deletes an event, marking it as cancelled. The event is not permanently removed and can still be viewed as deleted. Only the event organizer can delete the event.

## Export event as ICS file

 - [GET /api/v1/events/{eventId}.ics](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D.ics/get.md): Exports a single event in ICS (iCalendar) format for import into calendar applications.

## Accept an invite-only event invitation

 - [POST /api/v1/events/{eventId}/accept](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1accept/post.md): Accepts an invitation to the invite-only event, confirming attendance. Only invited users can accept.

## Get invite-only event attendees

 - [GET /api/v1/events/{eventId}/attendees](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1attendees/get.md): Returns the list of attendees for an invite-only event along with their response statuses (accepted, tentative, rejected, pending).

## Remove user from invite-only event

 - [DELETE /api/v1/events/{eventId}/attendees/{userId}](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1attendees~1%7Buserid%7D/delete.md): Revokes a user's invitation or removes them from an invite-only event. Only the event organizer can remove attendees.

## Invite user to an invite-only event

 - [POST /api/v1/events/{eventId}/attendees/{userId}](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1attendees~1%7Buserid%7D/post.md): Sends an invitation to a specific user for an invite-only event. Only the event organizer can invite attendees.

## Cancel a scheduled event

 - [POST /api/v1/events/{eventId}/cancel](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1cancel/post.md): Cancels a scheduled event, notifying all attendees. The event remains visible but marked as cancelled. Only the event organizer can cancel.

## Express interest in an event

 - [POST /api/v1/events/{eventId}/interested](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1interested/post.md): Marks the authenticated user as interested in a public event. Cannot be used for invite-only events. Returns updated event statistics.

## Join a public event

 - [POST /api/v1/events/{eventId}/join](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1join/post.md): Confirms attendance for a public event. Cannot be used for invite-only events which require invitations. Returns updated event statistics.

## Leave or revoke interest in event

 - [DELETE /api/v1/events/{eventId}/joinOrInterested](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1joinorinterested/delete.md): Removes the authenticated user's interest or participation in a public event. Cannot be used for invite-only events. Returns updated event statistics.

## Tentatively accept invite-only event

 - [POST /api/v1/events/{eventId}/maybe](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1maybe/post.md): Responds 'maybe' to the invite-only event invitation, indicating tentative attendance. Only invited users can respond.

## Get mutual event attendees

 - [GET /api/v1/events/{eventId}/mutual](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1mutual/get.md): Returns a list of users who are both attending the specified public event and are followed by the authenticated user.

## Reject invite-only event invitation

 - [POST /api/v1/events/{eventId}/reject](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1reject/post.md): Declines an invitation to the invite-only event. Only invited users can reject invitations.

## Translate event content

 - [POST /api/v1/events/{eventId}/translate](https://docs.wellesley.social/openapi/events/paths/~1api~1v1~1events~1%7Beventid%7D~1translate/post.md): Translates event title and description to the specified language. Translation is cached for future requests.

