Change a member's role
curl --request PATCH \
--url https://intentleads.si/api/v1/team/members/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "owner"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'owner'})
};
fetch('https://intentleads.si/api/v1/team/members/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://intentleads.si/api/v1/team/members/{userId}"
payload = { "role": "owner" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"user_id": "c41d7e90-2a3b-4f5c-8d6e-9f0a1b2c3d4e",
"role": "owner"
}
Change a member's role
Makes someone an owner or a member. The last owner can’t be made a member.
Admin key required. Standard keys get 403 admin_key_required.
PATCH
/
api
/
v1
/
team
/
members
/
{userId}
Change a member's role
curl --request PATCH \
--url https://intentleads.si/api/v1/team/members/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "owner"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'owner'})
};
fetch('https://intentleads.si/api/v1/team/members/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://intentleads.si/api/v1/team/members/{userId}"
payload = { "role": "owner" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"user_id": "c41d7e90-2a3b-4f5c-8d6e-9f0a1b2c3d4e",
"role": "owner"
}
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
The member's user_id.
Body
application/json
Available options:
member, owner