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

# Delete Event

> Delete an event. Only pending events that were created manually (not by cron jobs) can be deleted.

<Note>
  Only pending events created manually (not by cron jobs) can be deleted.
</Note>


## OpenAPI

````yaml DELETE /api/v1/events/{id}
openapi: 3.1.0
info:
  title: Cuey API
  description: >-
    REST API for scheduling webhooks with precision timing. Schedule one-time
    events or create recurring cron jobs.
  version: 1.0.0
  contact:
    email: support@cuey.dev
servers:
  - url: https://cuey.dev
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Events
    description: Endpoints for managing scheduled events
  - name: Crons
    description: Endpoints for managing recurring cron jobs
paths:
  /api/v1/events/{id}:
    delete:
      tags:
        - Events
      summary: Delete event
      description: >-
        Delete an event. Only pending events that were created manually (not by
        cron jobs) can be deleted.
      operationId: deleteEvent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Event deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: TypeScript
          label: TypeScript SDK
          source: |-
            import { cuey } from 'cuey';

            await cuey.events.delete('event-id');
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            success:
              type: boolean
      required:
        - data
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - NOT_FOUND
                - BAD_REQUEST
                - VALIDATION_ERROR
                - INTERNAL_SERVER_ERROR
            details:
              type: object
          required:
            - message
            - code
      required:
        - error
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        API key authentication. Include your API key in the Authorization header
        as: Bearer <your-api-key>

````