Create a workspace API key
curl --request POST \
--url https://intentleads.si/api/v1/workspaces/{id}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme OS",
"role": "standard"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme OS', role: 'standard'})
};
fetch('https://intentleads.si/api/v1/workspaces/{id}/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://intentleads.si/api/v1/workspaces/{id}/keys"
payload = {
"name": "Acme OS",
"role": "standard"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"workspace": "6f1d2c3b-4a5e-4f60-8172-93a4b5c6d7e8",
"id": "2b3c…",
"key": "il_live_…",
"role": "standard",
"note": "Store this key now; it isn't shown again. It works for this workspace only."
}{
"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": "workspace_not_found",
"message": "No such workspace in your organization."
}{
"error": "internal_error",
"message": "Something went wrong. Try again."
}Create a workspace API key
An API key for the workspace, made with the main organization’s admin key. The key is shown once and works for that workspace only.
Admin key required. Standard keys get 403 admin_key_required.
POST
/
api
/
v1
/
workspaces
/
{id}
/
keys
Create a workspace API key
curl --request POST \
--url https://intentleads.si/api/v1/workspaces/{id}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme OS",
"role": "standard"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme OS', role: 'standard'})
};
fetch('https://intentleads.si/api/v1/workspaces/{id}/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://intentleads.si/api/v1/workspaces/{id}/keys"
payload = {
"name": "Acme OS",
"role": "standard"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"workspace": "6f1d2c3b-4a5e-4f60-8172-93a4b5c6d7e8",
"id": "2b3c…",
"key": "il_live_…",
"role": "standard",
"note": "Store this key now; it isn't shown again. It works for this workspace only."
}{
"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": "workspace_not_found",
"message": "No such workspace in your organization."
}{
"error": "internal_error",
"message": "Something went wrong. Try again."
}