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 create one under Settings → API keys."
}{
"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 create one under Settings → API keys."
}{
"error": "key_not_found",
"message": "No active key with that id."
}{
"error": "internal_error",
"message": "Something went wrong. Try again."
}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.