Send an event

Tell Notix something happened to one person.

POSThttps://app.usenotix.dev/api/v1/events

Full access and sending access keys can call this. Key permissions lists the extra rules some calls have.

Tell Notix something happened to one person. Every enabled automation that starts on this event starts a run for them, and every run waiting for it (a Wait for event step) goes on. The answer is 202 with the runs it started, the automations it skipped and why, and how many waiting runs it woke.

Name the person with exactly one of contact_id or email. An address Notix has not seen becomes a contact in the automation's own list, when the key is a full access key, unless the address is suppressed or the list uses double opt-in. A sending-only key reaches existing contacts only. Creating the contact sets off nothing else.

payload is the event's data. When the event has properties (/v1/events/definitions), each value is checked and read as its type ("15" as the number 15); a value of the wrong type answers 422 and nothing happens. Later steps read the payload as event.*, and a wait step's event as wait_events.<name>.*.

A person already in an automation is not started in it a second time. An automation held for review takes the run and holds it until it is approved. A key with an approval policy that only saves drafts cannot start automations (403 APPROVAL_POLICY). Each automation it may start counts as one enrolment against the key's daily limit, and its emails against the key's email caps; what did not start is given back. A key limited to one domain starts only automations that send from that domain.

Idempotency

Pass an Idempotency-Key header to make a retry safe for 24 hours: the same key and body answers the original event and the runs it started, without starting them again, with Idempotent-Replayed: true.

Dry run

Send Notix-Dry-Run: true to see which automations it would start, without writing anything.

Body parameters

eventstringrequired

The event's name. Every enabled automation that starts on it starts.

contact_idstring

An existing contact's id. Send this or email, not both.

At most 64 characters.

contactIdstring

Same as contact_id.

At most 64 characters.

emailstring

The person's address. An address Notix has not seen becomes a contact in the automation's list, with a full access key, unless it is suppressed or the list uses double opt-in.

payloadmap of any

The event's data. Checked against the event's properties; later steps read it as event.*.

Headers

Authorizationstringrequired

Bearer followed by your API key.

Idempotency-Keystring

Makes the request safe to retry for 24 hours. Same key and same body answers the original result without running again, with the response header Idempotent-Replayed: true. Same key and a different body answers 409 NOT_UNIQUE; same key while the first request is still running answers 409 too, so retry shortly. Keys are scoped to the API key.

Notix-Dry-Runstring

Set to true to preview the request instead of running it. The answer is 200 with dryRun: true: who it would reach, what they would see, what it would cost, whether policy allows it and the limits it counts against. Nothing is sent, charged, reserved or written. A write route that cannot preview answers 400.

Errors

400

Neither or both of contact_id and email, or the body is not valid.

403

The key may not send (read-only), or its approval policy does not let it start automations (`reason` APPROVAL_POLICY).

404

No contact with this contact_id for the calling team.

409

The Idempotency-Key was used with a different body, or its first request is still running.

422

The payload does not match the event's properties.

429

The key's daily enrolment limit or email cap is reached.

Every error has the same shape. See all error codes.

curl -X POST "https://app.usenotix.dev/api/v1/events" \
  -H "Authorization: Bearer $NOTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "event": "payment.failed"
}'
Response200
{
  "dryRun": true,
  "kind": "string",
  "verdict": {
    "allowed": true,
    "reasons": [
      "string"
    ]
  },
  "checks": [
    "string"
  ]
}
Open in ClaudeOpen in ChatGPT