Skip to main content

Events

The Events feature in social.plus SDK enables users to create, manage, and participate in scheduled events with comprehensive RSVP functionality. Events can be created for communities or user timelines, supporting both virtual and in-person gatherings with livestream integration.

Overview

Events in social.plus are time-based social activities that allow users to:
  • Schedule virtual or in-person events
  • Manage event details including location and timezone
  • Track attendees through RSVP responses
  • Create discussion spaces for event participants
  • Integrate livestreaming for virtual events
  • Discover upcoming and past events

Key Features

Event Creation

Schedule and organize events
  • Virtual and in-person event types
  • Timezone-aware scheduling
  • Cover images and descriptions
  • Location and external URL support

RSVP Management

Track event attendance
  • Going, Interested, Not Going responses
  • Attendee lists and counts
  • User RSVP history
  • Response notifications

Event Discovery

Find relevant events
  • Query by community or user
  • Filter by status and type
  • Sort by start time or creation date
  • Upcoming and past event views

Livestream Integration

Virtual event broadcasting
  • Schedule events with livestream
  • Automatic discussion community
  • Live chat during broadcasts
  • Event-specific permissions

Event Types

Events support two distinct types to accommodate different gathering formats:
TypeDescriptionUse Cases
VirtualOnline events accessible remotelyWebinars, online workshops, livestreams, virtual meetups
In-PersonPhysical location-based eventsConferences, local meetups, community gatherings

Event Lifecycle

StatusDescriptionCharacteristics
ScheduledEvent is upcomingCan be edited, RSVP open, notifications sent
LiveEvent is currently happeningLivestream active (if applicable), real-time interaction
EndedEvent has concludedRead-only, archived content, recorded stream available
CancelledEvent was cancelledNo longer active, attendees notified

Event Permissions

Access control for event management:
PermissionDescriptionRequired For
CREATE_EVENTCreate events in global feedCreating user timeline events
CREATE_EVENT_WITH_LIVESTREAMCreate events with livestream capabilityVirtual events with broadcasting
DELETE_EVENTDelete any eventRemoving events (moderator)
MANAGE_COMMUNITY_EVENTSManage events in a communityCommunity event moderation
Permission Scope: Permissions can be granted globally or per-community. Check permissions before showing creation options.

Event Origin Types

Events can be created in two contexts:
OriginDescriptionAccess Control
CommunityEvent belongs to a specific communityCommunity members can view and RSVP
UserEvent created on user’s timelineFollows user’s privacy settings

Quick Start

1

Create an Event

Schedule a new event with essential details
const event = await eventRepository.createEvent({
  title: "Community Meetup 2025",
  description: "Join us for our annual community gathering",
  type: AmityEventType.IN_PERSON,
  startTime: "2025-02-15T18:00:00Z",
  originType: AmityEventOriginType.COMMUNITY,
  originId: "community-123",
  location: "123 Main St, City",
  metadata: {
    timezone: "America/New_York"
  }
});
2

RSVP to Event

Respond to an event invitation
const rsvp = await event.createRSVP(
  AmityEventResponseStatus.GOING
);
3

Query Events

Discover upcoming events
const upcomingEvents = eventRepository.getEvents({
  originType: AmityEventOriginType.COMMUNITY,
  originId: "community-123",
  status: AmityEventStatus.SCHEDULED,
  sortBy: AmityEventSortOption.START_TIME
});

Common Use Cases

Community Events

Create events that bring community members together:
  • Weekly community calls
  • Monthly meetups
  • Special announcements
  • Collaborative workshops

Virtual Gatherings

Host online events with livestream integration:
  • Webinars and presentations
  • Live Q&A sessions
  • Virtual conferences
  • Online workshops

Hybrid Events

Combine in-person and virtual attendance:
  • Livestream physical events
  • Multi-location gatherings
  • Regional meetups with online participants

Event Data Model

Key fields in the AmityEvent object:
interface AmityEvent {
  eventId: string;
  title: string;
  description: string;
  type: AmityEventType; // virtual | in_person
  status: AmityEventStatus; // scheduled | live | ended | cancelled
  startTime: string; // ISO 8601 format
  endTime?: string;
  originType: AmityEventOriginType; // community | user
  originId: string;
  userId: string; // Event creator
  rsvpCount: number;
  interestedCount: number;
  location?: string;
  externalUrl?: string;
  coverImageFileId?: string;
  tags: string[];
  metadata: {
    timezone: string;
  };
  discussionCommunityId?: string;
  isDeleted: boolean;
  createdAt: string;
  updatedAt: string;
  
  // Linked objects
  creator: AmityUser;
  targetCommunity?: AmityCommunity;
  coverImage?: AmityImage;
}

RSVP Response Types

StatusDescriptionUse Case
GoingUser will attendConfirmed attendance
InterestedUser might attendConsidering attendance
Not GoingUser won’t attendDeclined invitation

Best Practices

Always store and transmit times in ISO 8601 format with timezone information:
  • Use UTC for storage
  • Include timezone in metadata
  • Display times in user’s local timezone
  • Account for daylight saving changes
const event = await createEvent({
  startTime: "2025-02-15T18:00:00Z", // UTC
  metadata: {
    timezone: "America/New_York" // Display timezone
  }
});
Consider these factors when scheduling events:
  • Allow sufficient lead time for promotion
  • Check for conflicting events
  • Consider timezone differences for virtual events
  • Set appropriate end times
  • Send reminder notifications
Implement proper permission checks:
// Check global permission
const canCreate = await client.hasPermission(
  AmityPermission.CREATE_EVENT
);

// Check community permission
const canCreateInCommunity = await client.hasPermission(
  AmityPermission.CREATE_EVENT,
  communityId
);
Optimize event queries for better discovery:
  • Use appropriate filters (status, type, origin)
  • Sort by relevant criteria (start time, creation date)
  • Implement pagination for large result sets
  • Cache frequently accessed events

Next Steps