---
title: "Send a custom event into the product's Journeys."
method: POST
path: "/v1/workspaces/{workspaceId}/events"
---

# Send a custom event into the product's Journeys.

`POST /v1/workspaces/{workspaceId}/events`

## Request

- Base URL: `https://api.bangermail.com`
- URL: `https://api.bangermail.com/v1/workspaces/{workspaceId}/events`
- Auth: HTTP bearer

Requires automation:execute. The event arrives on the product's implicit "Banger API events" incoming webhook, created on the first event and listed with the other webhooks so Journeys can name its connection_id, or on connection_id, another active incoming webhook of the same product. From there it is processed exactly like an event posted to that webhook's URL: active Journeys whose trigger names the event type and connection enroll the person at email (or their configured audience), and Journeys whose goal names it stop that person's runs. Events can start already-approved Journeys, which send email. The event id makes the call idempotent: repeating it with the same body returns duplicate true; reusing it for a different body returns 409 webhook_event_id_reused.

## Request body

- SendWorkspaceEventRequest
  - `type` string, required: Event name that Journey triggers and goals match, such as signup.
  - `id` union: Stable identifier of the event in the calling system. Without it, the Idempotency-Key header is the id.
    - string
    - number
  - `email` string, email: The person the event is about.
  - `name` string: The person's display name.
  - `occurred_at` string, date-time: When the event happened. Defaults to when Banger receives it.
  - `attributes` object: Values Journey conditions and email content can read. Text values hold at most 500 characters.
  - `connection_id` string, uuid: An active incoming webhook connection of the same product. Defaults to the Banger API events webhook.

## Response `202`

Event accepted, or already accepted under this id.

- object
  - `data` WorkspaceEventResult, required
    - `accepted` true, required
    - `duplicate` boolean, required: True when this id was already accepted; nothing ran again.
    - `connection_id` string, uuid, required: The connection the event arrived on.
    - `sequence_enrollments_created` integer, required
    - `sequence_enrollments_stopped` integer, required: Runs stopped by a Journey goal.
    - `sequence_matches_ignored` integer, required: Matching Journeys that could not use the event, such as one that enrolls a person when the event names no email.
    - `sequence_goals_predating_enrollment` integer, required: Goals that happened before the run they would stop had started.
    - `sequence_enrollments_rejected` JourneyTriggerRejection[]: Journeys that did not enroll this person because the event's data cannot fill their emails.
      - `journey_id` string, uuid, required
      - `journey_name` string, required
      - `fields` object[], required
        - `name` string, required: The contact field the email needs.
        - `problem` 'missing' | 'not_https', required

## Other responses

- `400`: Invalid event, or no event id (missing_event_id).
- `403`: Insufficient scope or product access.
- `404`: connection_id is not an active incoming webhook in this product.
- `409`: The event id was used for a different event (webhook_event_id_reused), the product's Banger API events webhook is disabled (api_events_disabled), or several products are active and none was chosen (product_required).
- `413`: The event is larger than 512 KiB.
- `422`: The source does not accept this event type, or is a Supabase auth hook. Or journey_trigger_data_invalid: every Journey the event would start rejected it, because a field their emails need is missing or a link is not an https:// address; error.details.sequence_enrollments_rejected lists each Journey and field. The event is not used, and the same event id can be sent again with corrected data.

---

[API](https://skmtc.dev/bangermail/apis/banger-api.md) · [All operations](https://skmtc.dev/bangermail/apis/banger-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bangermail/apis/banger-api/revisions/a149909267f9?raw)
