# Send to a webhook

> Collect details in the chat and send them to your own URL.

Source: https://askmavis.co/help/send-to-webhook  
Collection: Actions and procedures  
Last updated: 2026-12-05

**Send to a webhook** lets your AI agent collect details in a chat, like a name, email and what the visitor needs, and send them to a URL you choose. Use it to pass requests to an automation tool or your own server. It's on paid plans.

## Set it up

1. Open your agent, go to **Actions**, click **Add action** and choose **Send to a webhook**.
2. Describe **When to use** it, for example "When the visitor wants a quote for a bike service".
3. Under **Details to collect and send**, add each detail. Turn on **Required** for the ones you need.
4. Enter the **Webhook URL**. It must start with `https://`.
5. Add **Headers** if your URL needs them. Mark a key as **Secret** to store it encrypted.
6. Click **Send a test** to send sample values. It works before you save.
7. Save, then publish your agent.

The AI agent asks for missing details one at a time, repeats them back, and sends once the visitor confirms. It sends only when every required detail is there.

## What your URL receives

A `POST` with a JSON body:

```json
{
  "event": "action.submitted",
  "sentAt": "2026-11-20T08:15:00.000Z",
  "agent": { "id": "…", "name": "Northwave Bikes" },
  "action": "send_service_quote",
  "conversationId": "…",
  "source": "widget",
  "fields": { "name": "Mia Chen", "email": "mia@example.com", "bike_model": "Trek Domane" }
}
```

Any `2xx` answer counts as sent, whatever the body. Calls time out after 10 seconds and don't follow redirects.

If your URL fails, the AI agent tells the visitor it couldn't pass the request on and offers your team. You can see each send and its result in **Activity**.

Tests never send. Playground chats do, so you can try it end to end.

## Related

- [Collect leads and data](https://askmavis.co/help/collect-leads)
- [Custom actions](https://askmavis.co/help/custom-actions)
