# Custom Event

> Contains requests for sending custom, non-standard events to Segmentify using the CUSTOM_EVENT event name.

Contains requests for sending custom, non-standard events to Segmentify using the `CUSTOM_EVENT` event name. Use these when none of the built-in event types fit your use case.

**Requests:**
- **Trigger Event** — a generic custom event template. The `type` field is fully configurable via `{type}`, allowing you to define any custom interaction or trigger.
- **Mail Trigger Example** — a concrete example of a custom event used to trigger a transactional or behavioral email. Sets `type: "test-mail"` and passes `email` and `emailNtf` inside `params` to identify the recipient and opt-in status.

Custom events are useful for triggering Segmentify automations, A/B tests, or personalization rules that depend on business-specific signals.

## Trigger Event

**Example body**

```json
{
  "name": "CUSTOM_EVENT",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "testMode": "true",
  "device": "PC",
  "lang": "EN",
  "currency": "EUR",
  "params": {},
  "region": "",
  "type": "my-custom-event",
  "email": "user@example.com"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **Custom Event / Trigger Event** in the request body examples of *Send events*.
:::


## Mail Trigger Example

**Example body**

```json
[
  {
    "name": "CUSTOM_EVENT",
    "userId": "test-user-id-3",
    "sessionId": "test-session-id-3",
    "testMode": "false",
    "device": "PC",
    "noProcess": false,
    "nextPage": false,
    "params": {
      "email": "test3@segmentify.com",
      "emailNtf": "true"
    },
    "recommendIds": [],
    "pageUrl": "https://www.example.com",
    "referrer": "",
    "lang": "PL",
    "currency": "PLN",
    "region": "",
    "email": "test3@segmentify.com",
    "type": "test-mail"
  }
]
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **Custom Event / Mail Trigger Example** in the request body examples of *Send events*.
:::
