SecureGate Docs

Events

Event lifecycle — create events, manage rooms and cameras, register attendees, track occupancy

Event Model

An event is the top-level organizational unit in SecureGate. Events contain rooms, which contain cameras. Attendees are registered against events, and timeline entries track their movement across rooms.

Event
+-- Room (Main Entrance)
|   +-- Camera (Entry Cam 1, type: entry)
|   +-- Camera (Entry Cam 2, type: entry)
+-- Room (Conference Hall A)
|   +-- Camera (Hall A Cam, type: in-event)
+-- Room (Exit)
    +-- Camera (Exit Cam, type: exit)

Event Lifecycle

1. Create Event

curl -X POST /events \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "name": "Annual Security Summit 2026",
    "description": "Corporate security conference",
    "date": "2026-06-15T09:00:00Z",
    "end_date": "2026-06-15T18:00:00Z"
  }'

2. Add Rooms

Rooms represent physical spaces within the event venue. Each room has an optional capacity for occupancy tracking.

curl -X POST /rooms \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "event_id": "evt_abc123",
    "name": "Main Lobby",
    "capacity": 200
  }'

3. Add Cameras

Cameras are attached to rooms. The camera type determines how detections are interpreted:

TypePurpose
entryTracks arrivals — face detections create "entered" timeline entries
exitTracks departures — face detections create "exited" timeline entries
in-eventMonitors presence inside a room — no entry/exit tracking
curl -X POST /cameras \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "room_id": "room_xyz",
    "name": "Lobby Entry Cam",
    "type": "entry",
    "source": "rtsp://192.168.1.100:554/stream1"
  }'

4. Register Attendees

Attendees are registered with a face photo. The photo goes through the full detection pipeline (detect, quality filter, align, embed, encrypt, store).

curl -X POST /register-attendee/evt_abc123 \
  -H "Authorization: Bearer $TOKEN" \
  -F "name=Jane Smith" \
  -F "email=jane@example.com" \
  -F "photo=@jane.jpg"

Multiple photos can be registered per attendee for better recognition accuracy across different angles and lighting conditions.

5. Manage Invites

Invites track who has been invited to the event and their RSVP status.

# Create invite
curl -X POST /events/evt_abc123/invites \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "attendee_id": "att_456",
    "status": "pending"
  }'

# Update invite status
curl -X PUT /events/evt_abc123/invites \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "invite_id": "inv_789",
    "status": "accepted"
  }'

6. Go Live

Open the operator dashboard, navigate to the event, and activate cameras. The system begins real-time detection and matching against registered attendees.

Event Listing

The GET /events endpoint returns events categorized by status:

{
  "upcoming": [
    { "id": "evt_abc", "name": "Security Summit", "date": "2026-06-15T09:00:00Z" }
  ],
  "ongoing": [],
  "past": [
    { "id": "evt_def", "name": "Q1 Conference", "date": "2026-01-20T09:00:00Z" }
  ]
}

Occupancy Analytics

Room occupancy is calculated from entry/exit camera detections:

  • Current occupancy: entries minus exits for each room
  • Peak occupancy: highest concurrent count during the event
  • Capacity alerts: notification when occupancy exceeds room capacity

See the Timeline page for detailed presence tracking.

Soft Delete

Events are soft-deleted (DELETE /events/[id]). The event record remains in the database with a deleted_at timestamp. Associated face embeddings and timeline entries are retained for the configured retention period, then crypto-shredded by destroying the tenant's CEK.

On this page