Skip to main content
PATCH
Update a custom organization role

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organization
string
required

The name of the organization

id
string
required

The slug of the custom role

Body

application/json
name
string

The custom role name

description
string

The description of the custom role

permissions
enum<string>[]

The actions granted by the custom role. Must include show_organization. Replaces the full set when provided.

Available options:
add_billing_source,
add_team_member,
approve_planetscale_admin_access_request,
cancel_organization_invite,
create_baa_request,
create_oauth_application,
create_production_service_token_grant,
create_team,
delete_databases,
delete_oauth_authorizations,
delete_oauth_tokens,
deny_planetscale_admin_access_request,
destroy_organization,
destroy_team,
download_organization_invoice,
export_auth_attempts,
invite_organization_member,
list_baa_requests,
list_billing_sources,
list_billing_summaries,
list_organization_audit_logs,
list_organization_invitations,
list_organization_invoices,
list_planetscale_admin_access_requests,
manage_all_service_tokens,
pay_organization_invoice,
read_oauth_authorizations,
read_oidc_trusts,
remove_organization_member,
remove_team_member,
revoke_planetscale_admin_access,
update_billing_plan,
update_bulk_database_accesses,
update_integration,
update_organization,
update_organization_beta_feature,
update_organization_member,
update_sso,
update_team,
write_oauth_tokens,
write_oauth_applications,
create_databases,
create_schema_recommendation_requests,
create_service_token,
create_service_token_grant,
destroy_service_token,
destroy_service_token_grant,
list_databases,
list_organization_members,
list_service_token_grants,
list_service_tokens,
list_team_members,
list_teams,
list_vercel_projects,
read_metrics_endpoints,
read_oauth_applications,
read_oauth_tokens,
read_schema_recommendations,
show_database,
show_organization,
show_organization_member,
show_service_token,
show_service_token_grant,
show_team,
show_team_member,
update_service_token_grant,
close_schema_recommendations,
connect_branch_console,
create_branch,
create_branch_keyspace,
create_branch_password,
delete_backups,
deploy_deploy_request,
destroy_branch,
destroy_branch_keyspace,
destroy_branch_password,
list_database_members,
list_live_connections,
list_query_stats,
list_workflows,
manage_branch_password_cidrs,
manage_live_connections,
read_backups,
read_backup_policies,
read_database_webhooks,
read_maintenance_schedules,
rename_branch,
request_deploy,
restore_backup,
review_deploy_request,
show_branch,
show_database_member,
update_branch_vschema,
write_backups,
connect_production_read_only_branch,
connect_production_read_only_branch_console,
create_production_read_only_branch_password,
destroy_production_read_only_branch_password,
add_database_member,
add_vercel_integration,
approve_deploy_request,
connect_production_branch,
connect_production_branch_console,
create_production_branch_keyspace,
create_production_branch_password,
create_read_only_region,
create_workflow,
delete_production_branch_backups,
destroy_database,
destroy_production_branch,
destroy_production_branch_keyspace,
destroy_production_branch_password,
destroy_workflow,
import_database,
manage_branch_topology,
manage_database_branches,
manage_database_throttler,
manage_database_webhooks,
manage_insights_agent,
manage_production_branch_password_cidrs,
manage_production_branch_topology,
manage_production_live_connections,
remove_database_member,
rename_production_branch,
restore_production_branch_backup,
update_database,
update_database_beta_feature,
update_database_billing,
update_database_member,
update_maintenance_schedule,
update_production_branch_vschema,
write_backup_policies,
list_production_live_connections

Response

Returns the updated custom role

id
string
required

The ID of the custom role

name
string
required

The name of the custom role

slug
string
required

The unique slug of the custom role in the organization

description
string | null
required

The description of the custom role

permissions
object[]
required
created_at
string
required

When the custom role was created

updated_at
string
required

When the custom role was last updated