Copy page
Link Shortening
When creating a lead, you can optionally include one or more links:
| Field | Description |
|---|---|
link | A link to send to leads (Aktify does not shorten this link before sending it) |
linkToShorten | A full URL that Aktify will shorten for you |
linksToShorten | Multiple named URLs that Aktify will shorten for you (see Multiple links) |
link cannot be combined with linkToShorten or linksToShorten. You may provide linkToShorten and linksToShorten together.
Example
Request with linkToShorten:
curl -X POST https://api.aktify.io/api/v1/leads \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"phoneNumber": "(509) 555-1234",
"region": "CA",
"firstName": "John",
"linkToShorten": "https://www.yourcompany.com/landing-page?utm_source=aktify"
}'
Response:
{
"phoneNumber": "(509) 555-1234",
"region": "CA",
"firstName": "John",
"link": "https://links.yourcompany.com/ABC123"
}
Multiple links
Use linksToShorten when your outreach needs to send more than one link to a lead, such as an offer page and a scheduling page. Each entry has a key that you choose and an object with the url to shorten:
"linksToShorten": {
"offer": { "url": "https://www.yourcompany.com/offer" },
"schedule": { "url": "https://www.yourcompany.com/schedule" }
}
- Up to 10 links per lead.
- Keys may only contain letters, numbers, and underscores (for example,
offer,schedule_call,link2). - Each value must be an object with a
urlstring.
The key identifies where each link appears in your campaign's outreach messages, where it is referenced as {{ links.<key> }} (for example, {{ links.offer }}). To set up or change which links your outreach messages use, contact your Aktify Account Executive.
The key is also included as data.linkKey on lead.link_clicked webhook events, so you can tell which link a lead clicked.
Request with linksToShorten:
curl -X POST https://api.aktify.io/api/v1/leads \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"phoneNumber": "(509) 555-1234",
"region": "CA",
"firstName": "John",
"linksToShorten": {
"offer": { "url": "https://www.yourcompany.com/offer?utm_source=aktify" },
"schedule": { "url": "https://www.yourcompany.com/schedule?utm_source=aktify" }
}
}'
Response:
{
"phoneNumber": "(509) 555-1234",
"region": "CA",
"firstName": "John",
"shortenedLinks": {
"offer": "https://links.yourcompany.com/ABC123",
"schedule": "https://links.yourcompany.com/DEF456"
}
}