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
An Intent Leads API key, e.g. il_live_ followed by 32 letters and digits. Create one on the API and CLI page of the dashboard.
Path Parameters
Key id.
Body
application/json