Skip to main content
POST
Create/Register Webhook

Headers

Authorization
string
required

Bearer [access_token]

Content-Type
string
required

application/json

Body

application/json

Webhook subscription payload.

listId
enum<integer>
required

Event type to subscribe to. See Event types for what each value means.

Available options:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
Example:

2

callbackUrl
string
required

Callback URL that receives event payloads. Must be HTTPS and reachable from the Lofty backend.

Example:

"https://example.com/webhooks/lofty"

limit
integer<int32>
default:100

Maximum number of events to include in a single callback batch. Default 100, maximum 5000.

Required range: 1 <= x <= 5000
Example:

100

permissionMode
enum<integer>
default:0

Recipient resolution mode. 0 = assignment-based (default): callbacks fire for leads assigned to the subscribing user, or for company owners/admins. 1 = ownership-based: callbacks also fire for any lead the subscribing user manages by ownership (their team / office / personally owned), regardless of direct assignment.

Available options:
0,
1
Example:

0

authHeader
object

Optional. A header Lofty adds to every delivery of this subscription, for receivers behind an API gateway that only accepts a fixed credential. It is in addition to the signature headers, not a replacement for them. Write-only: stored encrypted, never returned.

Response

Subscription created. The response contains the new subscription's metadata and its signing secret (returned only by the create call).

subscribeId
integer<int64>
required

the subscribe id

Example:

1234

teamId
integer<int64>
required

The ID of the team to get

Example:

13233324

listId
integer<int32>
required

Event type of the subscription. See Event types for what each value means.

Example:

1

callbackUrl
string
required

The url link that you receive information

Example:

"http://xxx.test.com"

vendorId
integer<int64>

The ID of the vendor

Example:

123

limit
integer<int32>

limitation of webhook notifications in 30 mins for each, max is 5000

Example:

100

permissionMode
integer<int32>

Recipient resolution mode. 0 = assignment-based (default); 1 = ownership-based (also delivers leads the subscriber manages by team/office/personal ownership).

Example:

0

secret
string

Signing secret (whsec_...) used to verify that deliveries come from Lofty. Returned only when the subscription is created; it is never returned again. To get a new one, call the rotate endpoint.

Example:

"whsec_bG9mdHktc2FtcGxlLXNpZ25pbmctc2VjcmV0LTAwMDE="

warnings
object[] | null

Non-blocking remarks about the subscription that was just created, for example when the callbackUrl uses http or carries a query string. Present only on the create response, and only when there is something to report. The subscription is created either way.