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

# Delete Event

> Mark an event as deleted

This endpoint allows you to remove events that are no longer needed from your active listings.

**What it does:**

* Marks an event as deleted in the system (soft delete)
* Keeps the event data in the database but hides it from normal listings
* Changes the event's `is_deleted` status to `true`

**When to use it:**

* When an event has been canceled
* When you created an event by mistake
* When you want to clean up your event listings
* When you want to archive old events but retain their data

## Path Parameters

| Parameter  | Type   | Required | Description                                  |
| ---------- | ------ | -------- | -------------------------------------------- |
| `event_id` | string | Yes      | The unique identifier of the event to delete |

## Response

The API returns the updated event object with `is_deleted` set to `true`:

```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": true,
  "created_at": "2023-02-28T12:00:00Z"
}
```

**Note:** This is a soft delete operation. The event data is preserved in the system but will no longer appear in the regular event listings. This allows you to maintain historical records while cleaning up your active events.


## OpenAPI

````yaml DELETE /events/{event_id}
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/{event_id}:
    delete:
      summary: Delete Event
      description: Mark an event as deleted
      operationId: delete_event_events__event_id__delete
      parameters:
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            title: Event Id
      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:
    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.

````