Update Link
http
PUT https://services.leadconnectorhq.com/links/{linkId}Authorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Path parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
linkId | string | Yes | Link Id |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
name | string | Yes | first tag | |
redirectTo | string | Yes | https://www.google.com/ |
Responses
201 - Successful response
link(object)id(string): Example:n4AriwEnFrGh3tu08W0Uname(string): Example:first tagredirectTo(string): Example:https://www.google.com/fieldKey(string): Example:{{trigger_link.n4AriwEnFrGh3tu08W0U}}locationId(string): Example:ve9EPM428h8vShlRW1KT
json
{
"link": {
"id": "n4AriwEnFrGh3tu08W0U",
"name": "first tag",
"redirectTo": "https://www.google.com/",
"fieldKey": "{{trigger_link.n4AriwEnFrGh3tu08W0U}}",
"locationId": "ve9EPM428h8vShlRW1KT"
}
}400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X PUT 'https://services.leadconnectorhq.com/links/YOUR_linkId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "first tag",
"redirectTo": "https://www.google.com/"
}'const response = await fetch('https://services.leadconnectorhq.com/links/YOUR_linkId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "first tag", "redirectTo": "https://www.google.com/"}),
});
const data = await response.json();import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/links/YOUR_linkId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "first tag", "redirectTo": "https://www.google.com/"},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/links/YOUR_linkId');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'first tag', 'redirectTo': 'https://www.google.com/'}),
]);
$data = json_decode(curl_exec($ch), true);