Python
import requests
url = "https://app.langwatch.ai/api/organization/members/{userId}"
payload = { "disabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({disabled: true})
};
fetch('https://app.langwatch.ai/api/organization/members/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/organization/members/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"disabled": true
}
'{
"userId": "<string>",
"disabled": true,
"disabledAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"teamsLeftWithoutAdmin": [
{
"id": "<string>",
"name": "<string>"
}
]
}Members
Update member
Change a member’s organization role, or disable / re-enable their membership. Send exactly one of role or disabled. Re-enabling consumes a seat, so it is checked against the plan.
PATCH
/
api
/
organization
/
members
/
{userId}
Python
import requests
url = "https://app.langwatch.ai/api/organization/members/{userId}"
payload = { "disabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({disabled: true})
};
fetch('https://app.langwatch.ai/api/organization/members/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/organization/members/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"disabled": true
}
'{
"userId": "<string>",
"disabled": true,
"disabledAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"teamsLeftWithoutAdmin": [
{
"id": "<string>",
"name": "<string>"
}
]
}Authorizations
Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.
Path Parameters
Minimum string length:
1Response
200 - application/json
Success
Was this page helpful?
⌘I