> ## Documentation Index
> Fetch the complete documentation index at: https://docs.securegate.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get All Events

> Get all events, categorized by status

This endpoint gives you a complete list of all events in your account, organized by their current status. It's usually the first API you'll call when building an event dashboard or management interface.

**What it does:**

* Returns all your events, sorted into categories (ongoing, upcoming, ended, archived)
* Provides complete details for each event including location, times, and settings
* Helps you track which events are active and which have concluded

**When to use it:**

* When building an event management dashboard
* When you need to display a list of events to users
* To monitor the status of all your events at once

## Authentication

This endpoint requires authentication using an API key. Add the following header to your request:

```
x-api-key: YOUR_API_KEY
```

To obtain an API key, please contact our support team.

## Response

The response contains a list of all events organized by their status (ongoing, ended, up\_coming, archived). Each event includes its complete details including title, description, location, and timestamps.

```json theme={null}
{
  "ongoing": [
    {
      "title": "Annual Conference 2023",
      "description": "Technology industry conference",
      "instructions": "Check-in opens at 8:00 AM",
      "imageUrl": "https://example.com/images/events/annual-conference.png",
      "location": {
        "address": "123 Convention Center Way",
        "city": "San Francisco",
        "state": "CA",
        "zipCode": "94103",
        "country": "USA"
      },
      "start_timestamp": 1683730000000,
      "end_timestamp": 1683816400000,
      "type": "dated",
      "is_deleted": false,
      "id": "evt_abc123def456",
      "created_at": "2023-01-15T10:30:00.000000",
      "updated_at": "2023-01-15T10:30:00.000000"
    },
    {
      "title": "Tech Expo",
      "description": "Product showcase and demonstrations",
      "instructions": "Bring ID for security clearance",
      "imageUrl": "https://example.com/images/events/tech-expo.png",
      "location": {
        "address": "456 Innovation Blvd",
        "city": "New York",
        "state": "NY",
        "zipCode": "10001",
        "country": "USA"
      },
      "start_timestamp": 1684334800000,
      "end_timestamp": 1684421200000,
      "type": "dated",
      "is_deleted": false,
      "id": "evt_ghi789jkl012",
      "created_at": "2023-02-10T14:15:00.000000",
      "updated_at": "2023-02-10T14:15:00.000000"
    }
  ],
  "ended": [],
  "up_coming": [],
  "archived": []
}
```

Each event category contains an array of event objects. If there are no events in a particular category, an empty array is returned for that category.

## Example Request with cURL

```bash theme={null}
curl -X GET https://api.securegate.ai/events \
  -H "x-api-key: YOUR_API_KEY"
```


## OpenAPI

````yaml GET /events
openapi: 3.1.0
info:
  title: Securegate.ai API
  version: 0.1.0
servers:
  - url: https://api.securegate.ai
    description: Production environment
security:
  - ApiKeyAuth: []
paths:
  /events:
    get:
      summary: Get All Events
      description: Get all events, categorized by status
      operationId: get_all_events_events_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ongoing:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
                    description: Currently active events
                  ended:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
                    description: Events that have ended
                  up_coming:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
                    description: Events that will start in the future
                  archived:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
                    description: Archived events
components:
  schemas:
    Event:
      properties:
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
          default: ''
        instructions:
          type: string
          title: Instructions
          default: ''
        imageUrl:
          type: string
          title: Imageurl
        location:
          $ref: '#/components/schemas/EventLocation'
        start_timestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Timestamp
        end_timestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: End Timestamp
        type:
          $ref: '#/components/schemas/EventType'
          default: dated
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        id:
          type: string
          title: Id
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
      type: object
      required:
        - title
        - imageUrl
        - location
        - id
      title: Event
    EventLocation:
      properties:
        address:
          type: string
          title: Address
        city:
          type: string
          title: City
        state:
          type: string
          title: State
        zipCode:
          type: string
          title: Zipcode
        country:
          type: string
          title: Country
      type: object
      required:
        - address
        - city
        - state
        - zipCode
        - country
      title: EventLocation
    EventType:
      type: string
      enum:
        - fixed
        - dated
      title: EventType
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key authentication. Add your API key as the value of the 'x-api-key'
        header.

````