Create a workspace
curl --request POST \
--url https://intentleads.si/api/v1/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Medical"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Medical'})
};
fetch('https://intentleads.si/api/v1/workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://intentleads.si/api/v1/workspaces"
payload = { "name": "Acme Medical" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"workspace": {
"id": "6f1d2c3b-4a5e-4f60-8172-93a4b5c6d7e8",
"name": "Acme Medical"
},
"next": "POST /api/v1/workspaces/.../keys for its API key."
}{
"error": "invalid_name",
"message": "name: 2 to 100 characters."
}{
"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": "nested_workspace",
"message": "A workspace can't have workspaces of its own. Create it from the main organization."
}{
"error": "internal_error",
"message": "Something went wrong. Try again."
}Create a workspace
Workspaces: one per client, each with its own lanes, keys, exclusions and leads, all paid from your organization’s balance.
Everyone in your organization can open it, with their organization role. Make its API key with POST /api/v1/workspaces/{id}/keys.
Admin key required. Standard keys get 403 admin_key_required.
POST
/
api
/
v1
/
workspaces
Create a workspace
curl --request POST \
--url https://intentleads.si/api/v1/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Medical"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Medical'})
};
fetch('https://intentleads.si/api/v1/workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://intentleads.si/api/v1/workspaces"
payload = { "name": "Acme Medical" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"workspace": {
"id": "6f1d2c3b-4a5e-4f60-8172-93a4b5c6d7e8",
"name": "Acme Medical"
},
"next": "POST /api/v1/workspaces/.../keys for its API key."
}{
"error": "invalid_name",
"message": "name: 2 to 100 characters."
}{
"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": "nested_workspace",
"message": "A workspace can't have workspaces of its own. Create it from the main organization."
}{
"error": "internal_error",
"message": "Something went wrong. Try again."
}