Change a workspace user's role
curl --request PATCH \
--url https://intentleads.si/api/v1/workspaces/{id}/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/workspaces/{id}/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/workspaces/{id}/members/{userId}"
payload = { "role": "owner" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"workspace": "6f1d2c3b-4a5e-4f60-8172-93a4b5c6d7e8",
"user_id": "c41d7e90-2a3b-4f5c-8d6e-9f0a1b2c3d4e",
"role": "owner"
}
Change a workspace user's role
Their role from the workspace invite. Organization users are changed on the organization.
Admin key of the organization, or of the workspace itself. Standard keys get 403 admin_key_required.
PATCH
/
api
/
v1
/
workspaces
/
{id}
/
members
/
{userId}
Change a workspace user's role
curl --request PATCH \
--url https://intentleads.si/api/v1/workspaces/{id}/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/workspaces/{id}/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/workspaces/{id}/members/{userId}"
payload = { "role": "owner" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"workspace": "6f1d2c3b-4a5e-4f60-8172-93a4b5c6d7e8",
"user_id": "c41d7e90-2a3b-4f5c-8d6e-9f0a1b2c3d4e",
"role": "owner"
}