Destinations

A destination is a webhook URL that receives signed events (a lead was scored, a message was junk…), with filters, retries and a delivery log.

The Destination object

Properties

  • Name
    object
    Type
    'destination'
    Description

    The object type.

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

  • Name
    workspaceId
    Type
    string
    Description

    The workspace this object belongs to.

  • Name
    livemode
    Type
    boolean
    Description

    true for live data, false for data created with a test key.

  • Name
    type
    Type
    'webhook'
    Description

    Type.

  • Name
    name
    Type
    string
    Description

    Display name.

  • Name
    url
    Type
    string
    Description

     

  • Name
    events
    Type
    array of string
    Description

     

  • Name
    filter
    Type
    object or null
    Description

     

  • Name
    secretPrefix
    Type
    string
    Description

    Start of the signing secret, for identification

  • Name
    status
    Type
    'active' | 'disabled'
    Description

    Current status.

  • Name
    failureStreak
    Type
    number
    Description

     

  • Name
    disabledReason
    Type
    string or null
    Description

     

  • Name
    createdAt
    Type
    string
    Description

    When it was created (ISO 8601).

  • Name
    updatedAt
    Type
    string
    Description

    When it was last changed (ISO 8601).


GET/v1/destinations

List webhook destinations

Query parameters

  • Name
    limit
    Type
    integer
    Description

    1–100, default 20

  • Name
    starting_after
    Type
    string
    Description

    ID of the last item of the previous page

Request

GET
/v1/destinations
curl https://core.leadveyor.com/v1/destinations \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only

Response 200

{
  "object": "list",
  "data": [
    {
      "object": "destination",
      "id": "dst_gEOzdmenCkhvMdgaKjIg8xNb",
      "workspaceId": "ws_Bd0Kh8oOOL8dKLzdocJ2isAj",
      "livemode": true,
      "type": "webhook",
      "name": "CRM",
      "url": "https://crm.example.com/leadveyor-webhook",
      "events": [
        "lead.scored",
        "lead.outcome_recorded"
      ],
      "filter": null,
      "secretPrefix": "whsec_7fQa",
      "status": "active",
      "failureStreak": 0,
      "disabledReason": null,
      "createdAt": "2026-10-23T15:37:58.435Z",
      "updatedAt": "2026-10-23T15:37:58.435Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

POST/v1/destinations

Add a webhook: events are POSTed to the URL, signed with Leadveyor-Signature

Required attributes

  • Name
    url
    Type
    string
    Description

     

Optional attributes

  • Name
    name
    Type
    string
    Description

    Display name.

  • Name
    events
    Type
    array of string
    Description

    lead.created, lead.updated, lead.scored, lead.outcome_recorded, inbound.junk, inbound.failed, or a prefix like lead.*. Default: lead.scored

  • Name
    filter
    Type
    object or null
    Description

    Send only matching events, e.g. { "field": "evaluation.tier", "op": "in", "value": ["hot", "warm"] }

Request

POST
/v1/destinations
curl -X POST https://core.leadveyor.com/v1/destinations \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://n8n.example.com/webhook/abc",
    "name": "name",
    "events": [
      "events"
    ],
    "filter": {}
  }'

Response 201

{
  "object": "destination",
  "id": "dst_gEOzdmenCkhvMdgaKjIg8xNb",
  "workspaceId": "ws_Bd0Kh8oOOL8dKLzdocJ2isAj",
  "livemode": true,
  "type": "webhook",
  "name": "CRM",
  "url": "https://crm.example.com/leadveyor-webhook",
  "events": [
    "lead.scored",
    "lead.outcome_recorded"
  ],
  "filter": null,
  "secretPrefix": "whsec_7fQa",
  "status": "active",
  "failureStreak": 0,
  "disabledReason": null,
  "createdAt": "2026-10-23T15:37:58.435Z",
  "updatedAt": "2026-10-23T15:37:58.435Z"
}

GET/v1/destinations/{id}

Get a destination

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

Request

GET
/v1/destinations/{id}
curl https://core.leadveyor.com/v1/destinations/dst_3Jw8Hn5Kq1Tz7Lx2Pv9Rm4Bc \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only

Response 200

{
  "object": "destination",
  "id": "dst_gEOzdmenCkhvMdgaKjIg8xNb",
  "workspaceId": "ws_Bd0Kh8oOOL8dKLzdocJ2isAj",
  "livemode": true,
  "type": "webhook",
  "name": "CRM",
  "url": "https://crm.example.com/leadveyor-webhook",
  "events": [
    "lead.scored",
    "lead.outcome_recorded"
  ],
  "filter": null,
  "secretPrefix": "whsec_7fQa",
  "status": "active",
  "failureStreak": 0,
  "disabledReason": null,
  "createdAt": "2026-10-23T15:37:58.435Z",
  "updatedAt": "2026-10-23T15:37:58.435Z"
}

PATCH/v1/destinations/{id}

Change URL, events, filter; disable or re-enable

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

Optional attributes

  • Name
    url
    Type
    string
    Description

     

  • Name
    name
    Type
    string
    Description

    Display name.

  • Name
    events
    Type
    array of string
    Description

    lead.created, lead.updated, lead.scored, lead.outcome_recorded, inbound.junk, inbound.failed, or a prefix like lead.*. Default: lead.scored

  • Name
    filter
    Type
    object or null
    Description

    Send only matching events, e.g. { "field": "evaluation.tier", "op": "in", "value": ["hot", "warm"] }

  • Name
    status
    Type
    'active' | 'disabled'
    Description

    active re-enables a disabled destination

Request

PATCH
/v1/destinations/{id}
curl -X PATCH https://core.leadveyor.com/v1/destinations/dst_3Jw8Hn5Kq1Tz7Lx2Pv9Rm4Bc \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "name": "name",
    "events": [
      "events"
    ],
    "filter": {}
  }'

Response 200

{
  "object": "destination",
  "id": "dst_gEOzdmenCkhvMdgaKjIg8xNb",
  "workspaceId": "ws_Bd0Kh8oOOL8dKLzdocJ2isAj",
  "livemode": true,
  "type": "webhook",
  "name": "CRM",
  "url": "https://crm.example.com/leadveyor-webhook",
  "events": [
    "lead.scored",
    "lead.outcome_recorded"
  ],
  "filter": null,
  "secretPrefix": "whsec_7fQa",
  "status": "active",
  "failureStreak": 0,
  "disabledReason": null,
  "createdAt": "2026-10-23T15:37:58.435Z",
  "updatedAt": "2026-10-23T15:37:58.435Z"
}

DELETE/v1/destinations/{id}

Delete a destination

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

Request

DELETE
/v1/destinations/{id}
curl -X DELETE https://core.leadveyor.com/v1/destinations/dst_3Jw8Hn5Kq1Tz7Lx2Pv9Rm4Bc \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only

Response 200

{
  "object": "destination",
  "id": "id",
  "deleted": true
}

POST/v1/destinations/{id}/rotate-secret

Issue a new signing secret

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

Request

POST
/v1/destinations/{id}/rotate-secret
curl -X POST https://core.leadveyor.com/v1/destinations/dst_3Jw8Hn5Kq1Tz7Lx2Pv9Rm4Bc/rotate-secret \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only

Response 200

{
  "object": "destination",
  "id": "dst_gEOzdmenCkhvMdgaKjIg8xNb",
  "workspaceId": "ws_Bd0Kh8oOOL8dKLzdocJ2isAj",
  "livemode": true,
  "type": "webhook",
  "name": "CRM",
  "url": "https://crm.example.com/leadveyor-webhook",
  "events": [
    "lead.scored",
    "lead.outcome_recorded"
  ],
  "filter": null,
  "secretPrefix": "whsec_7fQa",
  "status": "active",
  "failureStreak": 0,
  "disabledReason": null,
  "createdAt": "2026-10-23T15:37:58.435Z",
  "updatedAt": "2026-10-23T15:37:58.435Z"
}

POST/v1/destinations/{id}/test

Send a destination.test event

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

Request

POST
/v1/destinations/{id}/test
curl -X POST https://core.leadveyor.com/v1/destinations/dst_3Jw8Hn5Kq1Tz7Lx2Pv9Rm4Bc/test \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only

Response 202

{
  "object": "event",
  "id": "evt_3fS2qHx6kwXoIIXGvOoNZYW2",
  "type": "lead.outcome_recorded",
  "livemode": true,
  "workspaceId": "ws_Bd0Kh8oOOL8dKLzdocJ2isAj",
  "createdAt": "2026-10-23T15:38:00.610Z",
  "data": {
    "object": {
      "object": "lead",
      "id": "lead_u8jzPde0IgxLd6GncfBAepfJ",
      "workspaceId": "ws_Bd0Kh8oOOL8dKLzdocJ2isAj",
      "livemode": true,
      "sourceId": "src_IhKtJ0RlgLKOmxgJTeKdNnFR",
      "inboundIds": [
        "inb_IBXuDL7DxtpYlSXpfKtHF4vU"
      ],
      "contactId": "ctc_CsMehGAkWvj7FAc9QeWJKY40",
      "contact": {
        "name": "Tom Baker",
        "firstName": "Tom",
        "lastName": "Baker",
        "emails": [
          "tom.baker@example.com"
        ],
        "phones": [
          "0412555777"
        ],
        "other": [],
        "company": null
      },
      "request": {
        "summary": "Customer wants a bathroom renovation in their apartment in Queens, with a budget of about $15k, starting next month.",
        "service": "Bathroom renovation"
      },
      "location": {
        "address": null,
        "city": "Queens",
        "postcode": null,
        "country": null
      },
      "language": "en",
      "fields": {
        "budget": {
          "amount": 15000,
          "currency": "USD"
        },
        "start_date": {
          "value": "2026-12-01",
          "min": "2026-12-01",
          "max": "2026-12-31",
          "asWritten": "next month"
        },
        "property_type": "apartment",
        "project_type": "bathroom"
      },
      "evaluation": {
        "confidence": 0.8,
        "criteria": [
          {
            "id": "budget_15k",
            "label": "Budget from $15k",
            "type": "rule",
            "result": "met",
            "grade": null,
            "points": 30,
            "evidence": null,
            "dimension": "what"
          }
        ],
        "dimensions": [
          {
            "id": "what",
            "label": "What",
            "score": 69,
            "confidence": 1,
            "known": [
              "budget_15k"
            ],
            "unknown": []
          }
        ],
        "decidedBy": null,
        "score": 60,
        "tier": "warm",
        "id": "eval_uvSwMFLZDe1f8rESQedUStPK",
        "profileId": "prof_R0CsTy4Qwb8DwkNhFdnXsiVp",
        "profileVersion": 1,
        "evaluatedAt": "2026-10-23T15:07:26.371Z"
      },
      "outcome": {
        "status": "won",
        "value": {
          "amount": 14800,
          "currency": "USD"
        },
        "reason": null,
        "occurredAt": "2026-11-02T09:30:00.000Z",
        "recordedAt": "2026-10-23T15:38:00.591Z",
        "recordedBy": {
          "type": "api_key",
          "id": "key_zz63FfkCzJr4i0B3JrTAwR4y"
        }
      },
      "state": "active",
      "metadata": {},
      "legacy": null,
      "createdAt": "2026-10-23T15:07:26.371Z",
      "updatedAt": "2026-10-23T15:38:00.591Z"
    },
    "previous": {
      "outcome": null
    }
  }
}

GET/v1/destinations/{id}/deliveries

Delivery log: status, attempts, response

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

Query parameters

  • Name
    limit
    Type
    integer
    Description

    1–100, default 20

  • Name
    starting_after
    Type
    string
    Description

    ID of the last item of the previous page

Request

GET
/v1/destinations/{id}/deliveries
curl https://core.leadveyor.com/v1/destinations/dst_3Jw8Hn5Kq1Tz7Lx2Pv9Rm4Bc/deliveries \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only

Response 200

{
  "object": "list",
  "data": [
    {
      "object": "delivery",
      "id": "dlv_e3nNyjOq9wMxEhh2FDEEtfjg",
      "destinationId": "dst_gEOzdmenCkhvMdgaKjIg8xNb",
      "eventId": "evt_VvVqE1SkHbn88HxjSI6bWHtP",
      "eventType": "destination.test",
      "status": "pending",
      "attempts": 1,
      "response": {
        "status": null,
        "body": null,
        "ms": 5
      },
      "error": "fetch failed",
      "createdAt": "2026-10-23T15:38:01.698Z",
      "lastAttemptAt": "2026-10-23T15:38:01.717Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

POST/v1/destinations/{id}/deliveries/{deliveryId}/retry

Send a delivery again

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

  • Name
    deliveryId
    Type
    string
    Description

     

Request

POST
/v1/destinations/{id}/deliveries/{deliveryId}/retry
curl -X POST https://core.leadveyor.com/v1/destinations/dst_3Jw8Hn5Kq1Tz7Lx2Pv9Rm4Bc/deliveries/deliveryId_123/retry \
  -H "Authorization: Bearer {api_key}" \
  -H "Leadveyor-Workspace: {workspace_id}"  # account-wide keys only

Response 202

{
  "object": "delivery",
  "id": "dlv_e3nNyjOq9wMxEhh2FDEEtfjg",
  "destinationId": "dst_gEOzdmenCkhvMdgaKjIg8xNb",
  "eventId": "evt_VvVqE1SkHbn88HxjSI6bWHtP",
  "eventType": "destination.test",
  "status": "pending",
  "attempts": 1,
  "response": {
    "status": null,
    "body": null,
    "ms": 5
  },
  "error": "fetch failed",
  "createdAt": "2026-10-23T15:38:01.698Z",
  "lastAttemptAt": "2026-10-23T15:38:01.717Z"
}

Was this page helpful?