> ## Documentation Index
> Fetch the complete documentation index at: https://docs.writesure.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delivery channels

> How sold leads reach you: email, Telegram, SMS, and webhooks for your CRM or automation tools.

Every lead you win is delivered **the moment the auction closes**. You choose where it goes under **Settings → Delivery**.

* **Email is on by default** and goes to your account email.
* You can turn on **one or more channels at once**: email, Telegram, SMS, and a webhook.
* A **Test delivery** button sends a clearly marked sample lead through your enabled channels, so you can check your setup before a real lead arrives. SMS is not included in test sends.

<Tip>
  Turn on an instant channel (**Telegram** or **SMS**) as well as email. Final expense leads convert best when you call right away, and a phone notification is the fastest way to know a lead has arrived.
</Tip>

## Telegram

Connecting takes one tap:

<Steps>
  <Step title="Connect">
    In **Settings → Delivery**, press **Connect Telegram**.
  </Step>

  <Step title="Start the bot">
    Telegram opens. Press **Start**.
  </Step>

  <Step title="Done">
    Back in Writesure, the Telegram card shows **Connected**.
  </Step>
</Steps>

Each lead arrives as a Telegram message with:

* the applicant's **state and age**
* a **tap-to-call** phone number and the applicant's **email**
* the qualifier answers: **coverage**, **budget**, and **beneficiary**
* the **Lead ID** and the **price** you paid
* an **Open in dashboard** button

You can disconnect Telegram at any time from the same card.

## SMS

SMS sends a short alert the moment a lead is sold to you:

```text theme={null}
WriteSure: new lead delivered - TX, 67
```

The alert includes only the applicant's state and age. Full details go to Telegram, email, and your dashboard.

* **US phone numbers only.**
* When you turn SMS on, we send a one-time confirmation text.
* Reply **STOP** to opt out, or **HELP** for help.
* SMS is not included in **Test delivery**.

## Webhook (CRM / automation)

The webhook sends each lead straight into your CRM or automation tool. We send a `POST` request to your HTTPS URL with `Content-Type: application/json`. Each request contains one JSON object for one lead.

### How delivery works

| Property | Value |
| - | - |
| Method | `POST` |
| Content type | `application/json` |
| Timeout | 10 seconds per attempt |
| Attempts | Up to 3: the first attempt, then retries 0.5 s and 1 s later |
| Success | Any `2xx` response |
| Retried | `5xx` responses, timeouts, and network errors |
| Not retried | `4xx` responses |

* **Deduplicate on `delivery_id`.** It stays the same across retries. If you receive the same `delivery_id` twice, it is the same lead, so don't create a second record.
* **Avoid URLs that redirect.** Point the webhook at the final URL that accepts the request.

<Warning>
  Requests are not signed today. Treat your webhook URL as a secret and share it only with the tool that receives your leads. Catch Hook URLs from Zapier, Make, and GoHighLevel already include their own token.
</Warning>

### Payload fields

Top-level fields:

| Field | Type | Nullable | Description |
| - | - | - | - |
| `lead_id` | string (UUID) | No | The lead. |
| `delivery_id` | string (UUID) | No | Unique to this lead's delivery to you, and the same on every retry. Use it as your dedupe key. |
| `campaign_id` | string (UUID) | Yes | The campaign that won the lead. |
| `buyer_id` | string (UUID) | Yes | Your Writesure account. |
| `buyer_name` | string | Yes | Currently always `null`. |
| `sold_price_cents` | integer | Yes | What you paid, in cents. `1700` = \$17.00. |
| `is_test` | boolean | No | `true` only for Test delivery sends. |
| `lead` | object | No | The lead details below. |

Fields inside `lead`. Any of them can be `null`, and enrichment fields such as `email`, `city`, and `source_*` are often missing.

| Field | Type | Description |
| - | - | - |
| `first_name` | string | Applicant's first name. |
| `last_name` | string | Applicant's last name. |
| `phone` | string | Phone in E.164 format, e.g. `+12125556789`. Map your CRM phone field to this one. |
| `phone_display` | string | Display format, e.g. `(212) 555-6789`. Non-US numbers are the same as `phone`. |
| `email` | string | Applicant's email. |
| `state` | string | Two-letter USPS state code. |
| `zip` | string | ZIP code. |
| `dob` | string | Date of birth (ISO date, `YYYY-MM-DD`). |
| `source_channel` | string | Traffic channel the lead came from, e.g. `search`. |
| `source_network` | string | Traffic network, e.g. `google`. |
| `city` | string | City. |
| `address` | string | Street address. |
| `desired_coverage` | string | Coverage the applicant is looking for. |
| `budget_range` | string | Applicant's monthly budget. |
| `existing_insurance` | string | Whether the applicant already has coverage. |
| `tobacco_use` | string or boolean | Tobacco use. |
| `beneficiary_type` | string | Who the beneficiary would be. |
| `tcpa_consent` | boolean | Whether the applicant gave TCPA consent. |
| `trustedform_cert_url` | string | Link to the consent certificate. |
| `created_at` | string | When the lead was created (ISO timestamp). |

### Example payload

```json theme={null}
{
  "lead_id": "f1e2d3c4-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
  "delivery_id": "a9b8c7d6-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
  "campaign_id": "11112222-3333-4444-8555-666677778888",
  "buyer_id": "33334444-5555-4666-8777-888899990000",
  "buyer_name": null,
  "sold_price_cents": 1700,
  "is_test": false,
  "lead": {
    "first_name": "Jane",
    "last_name": "Doe",
    "phone": "+12125556789",
    "phone_display": "(212) 555-6789",
    "email": "jane@example.com",
    "state": "TX",
    "zip": "75001",
    "dob": "1960-01-01",
    "source_channel": "search",
    "source_network": "google",
    "city": "Dallas",
    "address": null,
    "desired_coverage": null,
    "budget_range": null,
    "existing_insurance": null,
    "tobacco_use": null,
    "beneficiary_type": null,
    "tcpa_consent": true,
    "trustedform_cert_url": "https://cert.trustedform.com/...",
    "created_at": "2026-06-11T00:00:00Z"
  }
}
```

### Test delivery

Test delivery sends a sample payload to your webhook so you can set up and check your field mapping:

* `is_test` is `true`.
* IDs start with `test-`.
* `campaign_id`, `buyer_id`, and `sold_price_cents` are `null`.
* Nothing is billed.

### Connect Zapier, Make, or GoHighLevel

In each tool, create the trigger, paste its generated URL into the Writesure webhook setting, press **Test delivery**, then map the fields.

* **Zapier:** use **Webhooks by Zapier → Catch Hook**.
* **Make:** use **Webhooks → Custom webhook**.
* **GoHighLevel:** use the **Inbound Webhook** trigger.

## Email

Email is on by default and goes to your account email. Each email includes the full lead details and a link to that lead in your dashboard.

## If a channel fails

If a channel fails, **the lead is still yours**. It's always available in your dashboard **Inbox**. A failing channel doesn't affect the others: if your webhook is down, for example, your email and Telegram alerts still arrive.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.