curl -L -X PATCH https://api.turso.tech/v1/organizations/{organizationSlug}/members/{username} \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"role": "member"
}'
{
"member": {
"username": "<string>",
"email": "<string>",
"role": "admin"
}
}{
"error": "invalid role"
}{
"error": "updating member roles is only allowed for admin or owner"
}{
"error": "could not find user [username]"
}Members
Update Member Role
Update the role of an organization member. Only organization admins or owners can perform this action.
PATCH
/
v1
/
organizations
/
{organizationSlug}
/
members
/
{username}
curl -L -X PATCH https://api.turso.tech/v1/organizations/{organizationSlug}/members/{username} \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"role": "member"
}'
{
"member": {
"username": "<string>",
"email": "<string>",
"role": "admin"
}
}{
"error": "invalid role"
}{
"error": "updating member roles is only allowed for admin or owner"
}{
"error": "could not find user [username]"
}curl -L -X PATCH https://api.turso.tech/v1/organizations/{organizationSlug}/members/{username} \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"role": "member"
}'
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The slug of the organization or user account.
The username of a Turso user or organization member.
Body
application/json
The new role to assign to the member.
Available options:
admin, member, viewer Response
Successful response
Show child attributes
Show child attributes
Was this page helpful?