Skip to main content
POST
/
api
/
events
Create Events
curl --request POST \
  --url https://api.example.com/api/events \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "occurred": "2023-11-07T05:31:56Z",
    "event": "<string>",
    "resource": {},
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "related": [
      {}
    ],
    "payload": {},
    "follows": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
]
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Headers

x-prefect-api-version
string

Body

application/json
occurred
string<date-time>
required

When the event happened from the sender's perspective

event
string
required

The name of the event that happened

resource
Resource · object
required

The primary Resource this event concerns

id
string<uuid>
required

The client-provided identifier of this event

A list of additional Resources involved in this event

payload
Payload · object

An open-ended set of data describing what happened

follows
string<uuid> | null

The ID of an event that is known to have occurred prior to this one. If set, this may be used to establish a more precise ordering of causally-related events when they occur close enough together in time that the system may receive them out-of-order.

Response

Successful Response