Project

Set an org member's role on a project

Changed on

Idempotently sets or updates the explicit project grant of the specified org member. Self-demotion requires confirm_self_demotion=true.

put/projects/{project_id}/members/{member_id}/role

Request

  • Base URL: https://console.neon.tech/api/v2
  • URL: https://console.neon.tech/api/v2/projects/{project_id}/members/{member_id}/role
  • Auth: one of:
    • HTTP bearer
    • API key in cookie zenith
    • API key in cookie keycloak_token

Query parameters

confirm_self_demotionboolean

Request body

role'viewer' | 'editor' | 'admin' required

Per-project role. viewer maps to VIEWER, editor maps to EDITOR, and admin maps to ADMIN.

Response

Role set or updated

project_idstring required
member_idstring uuid required
user_idstring uuid required
emailstring email

Email address of the user who has been granted access to the project.

namestring

The user's display name.

org_role'admin' | 'member' | 'editor' | 'viewer' | 'collaborator' required

Organization-level role used by project member role management.

project_role'viewer' | 'editor' | 'admin'

Per-project role. viewer maps to VIEWER, editor maps to EDITOR, and admin maps to ADMIN.

org_default_project_permission'VIEWER' | 'EDITOR' | 'ADMIN'

The caller's effective permission for a project when per-project permissions are enabled. VIEWER grants read access, EDITOR adds update access, and ADMIN grants full management. Omitted for personal projects, flag-off organizations, and non-user subjects.

explicit_project_permission'VIEWER' | 'EDITOR' | 'ADMIN'

The caller's effective permission for a project when per-project permissions are enabled. VIEWER grants read access, EDITOR adds update access, and ADMIN grants full management. Omitted for personal projects, flag-off organizations, and non-user subjects.

effective_project_permission'VIEWER' | 'EDITOR' | 'ADMIN'

The caller's effective permission for a project when per-project permissions are enabled. VIEWER grants read access, EDITOR adds update access, and ADMIN grants full management. Omitted for personal projects, flag-off organizations, and non-user subjects.

credential_rotation_recommendedboolean

Hint that database credentials may need rotation after the role change.

org_api_key_rotation_recommendedboolean

Hint that project-scoped org API keys created by the target user may need rotation.

Changes