Send Event
Send an event to Brew to trigger automations and update contact data. Events can trigger automations, update contact properties, add contacts to subscription groups, and update basic contact information like names and user IDs. Perfect for tracking user actions like signups, purchases, or feature usage while keeping contact data in sync.
Authorizations
Include your Brew API key as a Bearer token in the Authorization header.
Example: Authorization: Bearer bw_api_your_key_here
Headers
Unique identifier to prevent duplicate events. Especially important for purchase events or other critical actions where duplicates could cause issues.
100
Body
Provide the contact's email, event details, and optionally contact information to update. Event properties become available as variables in triggered emails.
Contact Matching: You can provide email, userId, or both to identify the contact. When both are provided, Brew searches for a contact matching either identifier. If a contact is found (for example, by email), the other identifier (userId) will be updated on that contact. If no existing contact matches either identifier, a new contact is created with both values.
Custom Contact Properties: Include any custom contact properties as top-level fields. Custom properties can be strings, numbers, booleans, or dates. You must create custom properties in Brew before using them in API calls.
For detailed information about creating and managing custom properties, see our Custom Properties documentation.
Request body for sending an event
Response
Event sent successfully and will trigger any matching automations
Success response for event sending