# Capture website leads

> Customize the contact form, receive lead events and prefill a booking page.

Canonical: https://gosummer.ai/docs/messenger-leads
Publisher: Summer

Use the contact form to collect details from visitors who want follow-up.
The form saves the lead before it sends a notification.
Saving details does not book a call or send a customer email.

## Choose your form and buttons

Open **Customer messenger** in your company workspace. Select an installation.
Use **Welcome screen and contact form** to edit the headings, descriptions and button labels.
Add website links or contact-form buttons. Choose whether each appears on the welcome screen, in chat, or both.
Use **Move up** to change the button order.

Name, email and contact consent are required.
You can show a phone field, require a phone number, or show a company field.
The message field is optional. Keep consent clear about how your team will use the details.
Turn on the form in **Chat assistant instructions**.

Open **Website leads** to view saved contacts and their original conversations.
Open a conversation to correct contact details. Summer keeps the original submission and correction history.

## Receive lead events

Use Summer's signed webhooks to connect your CRM or team notifications.
Subscribe to `messenger.lead.submitted` with `summer webhooks save` or `summer_webhooks_save` in MCP.
Webhook setup requires `automation.manage`. The signing secret stays in your server's secret store.
See [webhook setup and signature checks](https://gosummer.ai/docs/developer-platform#automation).

The event includes:

- `id`: the event ID. Use it to avoid duplicate processing.
- `company`: the Summer company ID that owns the lead.
- `environment`: `staging` or `production`.
- `data.lead_id`: the conversation ID.
- `data.submission_id`: the original saved message ID.
- `data.installation_id`: the widget installation ID.
- `data.name`, `data.email`, `data.phone` and `data.company_name`: submitted contact details.
- `data.message`: the visitor's optional message.
- `data.consent_text` and `data.consented_at`: the accepted consent and its time.

Verify the signature and expected company before you process an event.
Return a successful response only after your system accepts it.
Summer retries failed deliveries. An exact form retry does not create another submission event.
Human contact corrections do not trigger another submission notification.

Use `summer_messenger_leads_list` or the API to read your company's lead list.
Reading leads requires `cases.read` and current company membership.

## Open a prefilled booking page

Set **Booking or follow-up URL** and **Button after submission** in the installation settings.
Summer shows the button after it saves the form.
The URL receives a `summer_lead` code. Contact details do not appear in that URL.
The code expires after 15 minutes and does not sign a visitor into an account.

Your server exchanges the code with:

```sh
BASE="https://api.gosummer.ai/v1/companies/{company}/environments/{environment}"
curl -X POST "$BASE/messenger/leads/handoff" \
  -H "Authorization: Bearer YOUR_SUMMER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"VALUE_FROM_SUMMER_LEAD_QUERY_PARAMETER"}'
```

This request requires `cases.read`. The code must belong to the selected company and environment.
Use the returned `contact` fields to prefill your calendar. Keep the Summer access token on your server.
The visitor still chooses a time and confirms the booking.

Summer's own website uses this handoff to open its call calendar with the submitted details.
It sends lead notifications to the team's configured Slack destination.
