Rename a key or change its role
curl --request PATCH \
--url https://intentleads.si/api/v1/keys/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "CRM sync (prod)"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'CRM sync (prod)'})
};
fetch('https://intentleads.si/api/v1/keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://intentleads.si/api/v1/keys/{id}"
payload = { "name": "CRM sync (prod)" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "7f3c2a9e-4b1d-4e8a-9c6f-2d5b8e1a0c34",
"name": "CRM sync (prod)",
"role": "standard",
"prefix": "il_live_7QmX"
}
Rename a key or change its role
Changes a key’s name, role or both. You can change the key you’re calling with; if you make it standard, it can’t call admin endpoints any more.
Admin key required. Standard keys get 403 admin_key_required.
PATCH
/
api
/
v1
/
keys
/
{id}
Rename a key or change its role
curl --request PATCH \
--url https://intentleads.si/api/v1/keys/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "CRM sync (prod)"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'CRM sync (prod)'})
};
fetch('https://intentleads.si/api/v1/keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://intentleads.si/api/v1/keys/{id}"
payload = { "name": "CRM sync (prod)" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "7f3c2a9e-4b1d-4e8a-9c6f-2d5b8e1a0c34",
"name": "CRM sync (prod)",
"role": "standard",
"prefix": "il_live_7QmX"
}
Authorizations
Headers
Only with an organization key: the workspace to act in (its id; ?workspace=<id> works too). Lanes, leads, exports, lists, websites and webhooks live in workspaces. Without it, an organization key acts in its only workspace, or gets 400 workspace_required (with the list of workspaces) when it has several. Workspace keys don't need it. On keys, team and activity it switches from the organization's own to that workspace's.
Body
application/json