Skip to main content
POST

Body Parameters

string
required
The name of the event to trigger. Must match the event name configured in an Automation trigger step.
Either contact_id or email must be provided, but not both.
string
The email address to associate with this event. Exactly one of contact_id or email must be provided. If no contact with this email exists in your Audience, one will be created automatically when the Automation runs.
object
An optional object containing custom data to pass to the Automation. This data can be used in template variables and conditions. If the event has a schema defined, the payload values will be validated and coerced to match the schema types.

Headers

string
Add an idempotency key to prevent duplicate Automation runs.
  • Use a key that identifies the event in your system, like order/123
  • Idempotency keys expire after 24 hours
  • Have a maximum length of 256 characters
  • Keys are scoped to the event name and the contact (contact_id or email), so the same key with another event or contact is a separate request
  • The email and contact_id are compared case-insensitively
  • The same contact sent once by contact_id and once by email counts as two requests
  • A retry with the same key returns the first successful response, with the Idempotent-Replayed: true header, and starts no runs, even if the payload changed
  • A failed request isn’t stored, so you can retry it with the same key
  • Reusing the key while the first request is still running returns a 409
Learn more
Successful requests return 202 Accepted with the JSON body below. If the request includes an Idempotency-Key, the response also includes an Idempotent-Replayed header. It’s true when Resend returns the stored response of an earlier request, and false when it processes the request.