Skip to main content

Link Swapping

Our link swap subscription is different from all other webhooks in that we make a POST request to your subscription url with the link_swap event type and then we wait for your response. This way, you don't have to make a new and separate request back to us with the new links.

Check out our Webhooks Endpoints or Documentation to set this up.

Delivery Headers

HTTP POST payloads that are delivered to your callback_url will contain several special headers:

HeaderDescription
x-salesloft-eventName of the event type that triggered the delivery. Must be one of: link_swap
x-salesloft-signatureThe HMAC hex digest of the response body. The HMAC hex digest is generated using the sha1 hash function and the callback_token as the HMAC key.

You will get a payload that looks like this:

{
"user": {
"id": 1,
"email": "myteammember@salesloft.com"
},
"team": {
"id": 123456
},
"mailing": {
"id": 30
},
"email": {
"id": 30
},
"person": {
"id": 1,
"email": "myteammember3@gmail.com"
},
"links": [
"http://OLD-LINK.COM", "http://ANOTHER-OLD-LINK.COM"
]
}

Payload Example

For Link_Swap events, you will return a json hash where the old link is the key and the new link is the value. We look at the response and expect to see something like this:

{
"links": {
"http://OLD-LINK.COM": "http://NEW-LINK.com",
"http://ANOTHER-OLD-LINK.COM": "http://ANOTHER-NEW-LINK.com"
}
}