Send data to Ahoy with webhooks
A webhook lets another system push data into Ahoy the moment something happens – a signup on your website, a lead from an outreach tool, a row in your own database. Each request can create or update a contact, add a note to their timeline, and set properties.
Before you begin
- Someone technical. The sending system needs to make an HTTP request, so you'll want a developer or a tool like Zapier or n8n.
- A contact identifier. Every request needs an email address or a LinkedIn URL, so Ahoy knows who it's about.
Set it up
- Go to Settings → Developers → Webhooks.
- Under Webhook & extension keys, enter a key name and create the key.
- Copy the key straight away. You won't see it again.
- Open Keys and request format and copy the webhook URL.
- Have your system send a POST request with a JSON body to that URL, with the key in a header.
Use either header:
X-Api-Key: your-api-key
Authorization: Api-Key your-api-key
What to send
| Block | Required | What it does |
|---|---|---|
contact | Yes | Identifies the person. If a contact with the same email or LinkedIn URL exists, it's updated. If not, one is created |
timeline_event | No | Adds something to the contact's timeline, such as a note |
properties | No | Sets built-in or custom properties on the contact |
write_mode | No | Set to overwrite to replace existing values. By default, only empty fields are filled |
idempotency_key | No | A unique value per event, so a retry doesn't create a duplicate |
Example
{
"contact": {
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"company": "Acme Corp"
},
"timeline_event": {
"type": "note",
"content": "Signed up for the waitlist"
},
"idempotency_key": "signup-10482"
}
The settings page has more examples you can copy, the full list of fields, and the responses you'll get back.
Good to know
- Existing data is safe by default. Without
write_modeset tooverwrite, a webhook only fills fields that are empty. - Unknown properties are rejected. If you send a property that doesn't exist, the request fails and tells you which one. Create the property first. See Create and manage fields.
- Send each field once. Put the email in
contactor inproperties, not both. - Keys can be deleted. Delete a key on the same page and anything using it stops working.
Website forms don't need a webhook
To capture form submissions from your website, add the Ahoy tracking code instead. There's nothing to build. See Capture website form submissions.
Inbound webhooks for automations
The same page has an Inbound webhooks list, managed by account admins. Each one has its own URL and feeds an automation. Writing your own automations isn't available in every workspace yet, so contact us if you need this.
Need help?
Email help@ahoy.ai or message us in your shared Slack channel.