---
title: "Report a custom event"
method: POST
path: "/events"
tags: ["Events"]
---

# Report a custom event

`POST /events`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/events`
- Auth: API key in header `Authorization`

Reports something that happened in your site or app, such as a signed lease, so tasks, email sequences and webhooks can act on it. Crevio announces it once as `custom.<name>` (`lease.signed` becomes `custom.lease.signed`) and stores nothing but the audit log entry.

Listen for it with a task (`trigger_type: "event"`, `event_conditions: {event_type: "custom.lease.signed"}`, optionally narrowed by `site` and by values in `data`), an email sequence (`trigger: {event: "custom.lease.signed"}`, which enrolls the event's `contact`), or a webhook endpoint (enable `custom.lease.signed`, or `custom.*` for every custom event).

Sites built on Crevio report events from their mutations with `ctx.emit(name, { contact, data })`; they are sent only after the mutation succeeds. Send an `Idempotency-Key` when you retry, so a retry is not announced twice.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `name` string, required: What happened, in lowercase words joined by dots, such as `lease.signed` or `booking_request.approved`. A leading `custom.` is accepted and dropped.
  - `contact` string: The contact (`con_...`) it happened to. Email sequences enroll this contact; without one they ignore the event.
  - `site` string: The site that reported it, by id (`site_...`) or worker name. Sites built on Crevio send their own. An id that is not one of your sites leaves `site` null. Tasks can listen to one site's events.
  - `data` object: Details of what happened, up to 8 KB as JSON. Passed through as `data` to tasks and webhooks; tasks can match on its top-level values.

## Response `201`

The event was announced

- object
  - `id` string, required: Unique id of this report (`cev_...`). Webhook deliveries and task runs carry it as `data.object.id`.
  - `object` 'custom_event', required
  - `type` string, required: The event type everything listens for: `custom.` followed by `name`, such as `custom.lease.signed`.
  - `name` string, required: The name you sent, without the `custom.` prefix.
  - `contact` string, nullable, required: The contact (`con_...`) it happened to, or null.
  - `site` string, nullable, required: The site (`site_...`) that reported it, or null.
  - `data` object, required: The details you sent.
  - `livemode` boolean, required
  - `created_at` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Resource not found
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per owner on the free tier: every API key and OAuth token one person holds on an account shares one budget, and the account's team keys share another. Retry after the number of seconds in `Retry-After`.
- `500`: Internal server error

## Changes

- **2026-12-04** `6be3ac8d9549`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/crevio/apis/crevio-api-v1/changes/events/post.md)

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) - [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/ccbd8fcbd6d7?raw)
