Rotate an API key
curl --request POST \
--url https://intentleads.si/api/v1/keys/{id}/rotate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://intentleads.si/api/v1/keys/{id}/rotate', 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}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "7f3c2a9e-4b1d-4e8a-9c6f-2d5b8e1a0c34",
"name": "CRM sync",
"role": "standard",
"key": "il_live_Rt5Yu8Io2Pa4Sd6Fg9Hj3Kl7Zx1Cv5Bn",
"note": "The old secret no longer works. Store this one now."
}{
"error": "unauthorized",
"message": "Send a valid API key as: Authorization: Bearer il_live_…"
}{
"error": "admin_key_required",
"message": "This needs an admin API key. Owners can create one on the API and CLI page."
}{
"error": "key_not_found",
"message": "No active key with that id."
}{
"error": "internal_error",
"message": "Something went wrong. Try again."
}Rotate an API key
Issues a new secret for a key, keeping its id, name and role. The old secret stops working at once, including when you rotate the key you’re calling with. The new secret is shown only in this response.
Admin key required. Standard keys get 403 admin_key_required.
POST
/
api
/
v1
/
keys
/
{id}
/
rotate
Rotate an API key
curl --request POST \
--url https://intentleads.si/api/v1/keys/{id}/rotate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://intentleads.si/api/v1/keys/{id}/rotate', 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}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "7f3c2a9e-4b1d-4e8a-9c6f-2d5b8e1a0c34",
"name": "CRM sync",
"role": "standard",
"key": "il_live_Rt5Yu8Io2Pa4Sd6Fg9Hj3Kl7Zx1Cv5Bn",
"note": "The old secret no longer works. Store this one now."
}{
"error": "unauthorized",
"message": "Send a valid API key as: Authorization: Bearer il_live_…"
}{
"error": "admin_key_required",
"message": "This needs an admin API key. Owners can create one on the API and CLI page."
}{
"error": "key_not_found",
"message": "No active key with that id."
}{
"error": "internal_error",
"message": "Something went wrong. Try again."
}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.