Skip to main content
POST
/
events
Ingest an event
curl --request POST \
  --url https://api.privy.com/v1/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "shopper@example.com",
  "event_type": "purchase_completed",
  "event_time": "2026-06-15T10:30:00Z",
  "event_data": {
    "order_id": "ORD-12345",
    "total": 99.99,
    "currency": "USD"
  }
}
'
{
  "event_id": "507f1f77bcf86cd799439011",
  "status": "accepted"
}
The custom events API is in closed beta. If you’re interested in trying it, reach out to Support.
Accepted events can trigger Flows and other automations, keyed on the event_type you send. A successful 200 response means the event was accepted for processing — it does not guarantee a specific automation ran.

Authorizations

Authorization
string
header
required

Send either an API token or an OAuth access token as Authorization: Bearer <token>. See the Authentication page for details.

Headers

Idempotency-Key
string

Optional key to safely retry without creating a duplicate event. Use a unique value (such as a UUID) per distinct event. Takes precedence over an idempotency_key body field.

Body

application/json

An event to ingest. You must identify the contact with exactly one of email, phone, or privy_id, and provide an event_type.

Everything else is optional. Unknown top-level keys are ignored — put your own data under event_data.

event_type
string
required

A name for the event. Up to 128 characters; letters, numbers, hyphens, and underscores only. Choose a stable, descriptive name — you'll use it to trigger Flows (e.g. purchase_completed, quiz_finished).

Maximum string length: 128
Pattern: ^[A-Za-z0-9_-]+$
Example:

"purchase_completed"

email
string<email>

The contact's email address. Provide exactly one of email, phone, or privy_id to identify the contact.

Example:

"shopper@example.com"

phone
string

The contact's phone number in E.164 format (+ followed by country code and number). Provide exactly one of email, phone, or privy_id.

Example:

"+15551234567"

privy_id
string

The contact's Privy customer ID (the id returned by the Contacts API, prefixed with cus_). Provide exactly one of email, phone, or privy_id.

Example:

"cus_a1b2c3d4e5f6g7h8"

event_time
string<date-time>

ISO 8601 date-time the event occurred. Must be UTC — end the timestamp with Z (or a zero offset). Optional; defaults to the time Privy received the event.

Example:

"2026-06-15T10:30:00Z"

event_data
object

Arbitrary key-value data describing the event. Values may be strings, numbers, booleans, null, objects, or arrays. Objects and arrays may be nested up to 10 levels deep. Stored and made available to downstream automations verbatim.

Example:
{
"order_id": "ORD-12345",
"total": 99.99,
"currency": "USD",
"items": [{ "sku": "SKU-1", "quantity": 2 }]
}
idempotency_key
string

Optional key to safely retry a request without creating a duplicate event. Prefer the Idempotency-Key header; if both are sent, the header wins. See the endpoint description for replay semantics.

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

The event was accepted, or replayed from a prior request with the same idempotency key.

The event was accepted (or replayed from a prior identical request).

event_id
string

Privy's identifier for the stored event.

Example:

"507f1f77bcf86cd799439011"

status
enum<string>
Available options:
accepted
Example:

"accepted"

idempotent_replay
boolean

Present and true only when this response was served from a prior request with the same idempotency key, rather than ingesting a new event.

Example:

true