Skip to content

Lead Deleted

Description

This event is triggered after an existing lead has been deleted from the scanleads system. The deletion process can either be triggered manually, or when a user requests the deletion via the deletion URL provided in the body lead webhook data part under delete_lead_url.

Payload Structure

type: string

Type of the event, always "lead_deleted".

version: string

Version of the webhook payload.

retry_count: number

Number of times the webhook has been retried.

trigger_time: string

Time when the event was triggered.

current_time: string

Current time when the webhook is sent.

data: Lead

Data related to the lead. See Lead Object.

Example Payload

{
  "type": "lead_deleted",
  "version": "1.0",
  "retry_count": 0,
  "trigger_time": "2023-10-01T13:00:00Z",
  "current_time": "2023-10-01T13:00:00Z",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "email": "example@example.com",
    "lists": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "Main Newsletter",
        "status": "is_signed_up",
        "meta": {
          "resource-name": "newsletter-1"
        }
      },
      {
        "id": "223e4567-e89b-12d3-a456-426614174000",
        "name": "Raffle",
        "status": "is_verified",
        "meta": {
          "resource-name": "main-raffle"
        }
      }
    ],
    "personal_data": {
      "email": "example@example.com",
      "salutation": "Herr",
      "title": "Dr.",
      "first_name": "Max",
      "last_name": "Mustermann",
      "birthdate": "1968-04-19",
      "phone": "+49 030 3994744",
      "mobile": "+49 0178 0178 0178",
      "address_line_1": "Feldmarkweg 50",
      "city": "Berlin",
      "country": "deutschland",
    },
    "consents": [
      {
        "id": "string",
        "type": "checkbox",
        "name": "Newsletter Wanted",
        "status": "active",

        "meta": {
          "key": "value"
        }
      },
      {
        "id": "string",
        "type": "external",
        "name": "Newsletter Double Opt-In",
        "status": "requested",

        "meta": {
          "key": "value"
        }
      }
    ],
    "meta": {
      "campaign_id": "1234abcd"
    },
    "delete_lead_url": null
  },
  "meta": {
    "custom_key": "some webhook handler specific data"
  }
}