---
ref: tool:klaviyo/create-event
name: Create an event
company: company:klaviyo
workflows: []
access: [cli, api]
tags: [capability:track-events, category:email, has:api, has:cli]
docs: https://developers.klaviyo.com/en/reference/create_event
updated: 2026-09-27
---

# Create an event

Records one event, such as a purchase, against a profile and creates or updates that profile.

Note: Events can trigger flows: set `backfill` to `true` for historical events that shouldn't. For many events, `POST /api/event-bulk-create-jobs` records up to 1,000 per request.

## Set up

Use the first option your agent supports.

### CLI (official)

Install the command, then confirm it runs.

```sh
go install github.com/klaviyo/klaviyo-cli/cmd/klaviyo@latest
klaviyo --version
```

Run `klaviyo events create`.

Set `$KLAVIYO_API_KEY` in your environment first (get a key: https://www.klaviyo.com/create-private-api-key).

### API (official)

- Base URL: https://a.klaviyo.com
- Endpoint: `POST /api/events`
- Auth: send the header `Authorization: Klaviyo-API-Key $KLAVIYO_API_KEY`
- Get a key: https://www.klaviyo.com/create-private-api-key
- Docs: https://developers.klaviyo.com/en/reference/api_overview

Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
