---
title: "Create an event"
method: POST
path: "/api/v1/events"
tags: ["Events"]
---

# Create an event

`POST /api/v1/events`

Send an event to Trigger.dev to trigger job runs through eventTrigger()

## Request body

- EventRequest
  - `event` object
    - `name` string, required — The name of the event
    - `payload` object — The payload of the event
    - `context` object — An optional context object
    - `id` string — Unique identifier for the event. Auto-generated if not provided. If you provide an ID that already exists, the event will not be redelivered.
    - `timestamp` string, date-time — Event timestamp. Defaults to current timestamp if not provided.
    - `source` string — Event source, default is 'trigger.dev'.
  - `options` object
    - `deliverAt` string, date-time — Optional Date to deliver the event.
    - `deliverAfter` integer — Optional delay in seconds before delivering the event.
    - `accountId` string — Optional account ID to associate with the event.

## Response `200`

Event successfully sent

- EventResponse
  - `id` string — The ID of the event that was sent.
  - `name` string — The name of the event that was sent.
  - `payload` DeserializedJson — A JSON object that represents the deserialized payload or context.
  - `context` DeserializedJson — A JSON object that represents the deserialized payload or context.
  - `timestamp` string, date-time — The timestamp of the event that was sent.
  - `deliverAt` string, date-time, nullable — The timestamp when the event will be delivered. Null if not applicable.
  - `deliveredAt` string, date-time, nullable — The timestamp when the event was delivered. Null if not applicable.
  - `cancelledAt` string, date-time, nullable — The timestamp when the event was cancelled. Null if the event wasn't cancelled.

## Other responses

- `400` — Invalid request
- `401` — Unauthorized - API key is missing or invalid
- `422` — Invalid request body

---

[API](https://skmtc.dev/winsenlabs/apis/trigger-dev-api.md) · [All operations](https://skmtc.dev/winsenlabs/apis/trigger-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/winsenlabs/trigger-dev-api/revisions/0e8378fc02a0/schema)
