> ## 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.

# Create Event

> Create a new event

This endpoint creates a new event in your account. Use it to set up events where you'll need identity verification and secure access control.

**What it does:**

* Creates a new event with the details you provide
* Generates a unique ID for the event that you'll use in other API calls
* Sets up the foundation for sending invites and registering attendees

**When to use it:**

* When organizing a new conference, meeting, or secure access location
* When you need to create a new venue for identity verification
* At the beginning of your event planning process

## Request Body

The request body should include the event details following the EventCreate schema:

```json theme={null}
{
  "title": "Annual Tech Conference",
  "description": "Join us for the annual tech conference featuring speakers from top tech companies",
  "instructions": "Please arrive 30 minutes before the event starts for registration",
  "imageUrl": "https://example.com/event-image.jpg",
  "location": {
    "address": "123 Conference Center Dr",
    "city": "San Francisco",
    "state": "CA",
    "zipCode": "94105",
    "country": "USA"
  },
  "start_timestamp": 1677609600,
  "end_timestamp": 1677696000,
  "type": "dated"
}
```

## Response

The API returns the created event object with all its details, including the generated event ID:

```json theme={null}
{
  "id": "event-123",
  "title": "Annual Tech Conference",
  "description": "Join us for the annual tech conference featuring speakers from top tech companies",
  "instructions": "Please arrive 30 minutes before the event starts for registration",
  "imageUrl": "https://example.com/event-image.jpg",
  "location": {
    "address": "123 Conference Center Dr",
    "city": "San Francisco",
    "state": "CA",
    "zipCode": "94105",
    "country": "USA"
  },
  "start_timestamp": 1677609600,
  "end_timestamp": 1677696000,
  "type": "dated",
  "is_deleted": false,
  "created_at": "2023-02-28T12:00:00Z"
}
```

**Important fields:**

* `type`: Use "dated" for one-time events with start/end times, or "fixed" for permanent locations
* `imageUrl`: An image representing your event (shows up in notifications and the check-in interface)
* `instructions`: Special guidance for attendees that will appear in their invitations


## OpenAPI

````yaml POST /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:
    post:
      summary: Create Event
      description: Create a new event
      operationId: create_event_events_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EventCreate:
      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
      type: object
      required:
        - title
        - imageUrl
        - location
      title: EventCreate
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  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.

````