/members/{userId}Update Member Role
Changes the project role of an existing project member.
Does not affect the user's org-level membership or memberships on other projects.
Requires PROJECT_ADMIN on the project or ORG_ADMIN.
| userId * | path | The member's user id ( |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| role * | "PROJECT_ADMIN" | "PROJECT_EDITOR" | "PROJECT_MEMBER" | "PROJECT_VIEWER" | "PROJECT_AUDITOR" | "PROJECT_AUTHOR" | "PROJECT_ANALYST" | The member's new project role: |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 401 | K9O_SESSION_EXPIRED | Your session has expired; sign in again to continue. |
| 403 | K9O_ACCESS_DENIED | You do not have the required role (PROJECT_ADMIN or higher) to change a member's role. |
| 404 | K9O_END_USER_NOT_FOUND | No member with the specified user ID was found on this project. |
| 410 | K9O_SLUG_GONE | The project slug in the URL has been renamed; update your integration to use the new slug. |
| data * | object | A project member. |
| userId * | string | The member's user id ( |
| projectId * | string | The project's id ( |
| role * | "PROJECT_ADMIN" | "PROJECT_EDITOR" | "PROJECT_MEMBER" | "PROJECT_VIEWER" | "PROJECT_AUDITOR" | "PROJECT_AUTHOR" | "PROJECT_ANALYST" | The member's explicit project role. Org owners and admins also have admin access to every project without a row here, and are listed only if they have one. |
| email * | string | The member's sign-in email address. |
| displayName * | string | The member's display name. |
| invitedAt * | string <date-time> | When the membership was created. |
| acceptedAt * | any | When the membership was accepted, or null while it is still an invitation. |
| One of: string <date-time> | ||
| or: null | ||
| state * | "invited" | "active" |
|
| meta * | any | Request metadata: cost, timing and the request and trace ids. |
curl -X PATCH 'https://<org>.api-<region>.k9o.io/@storefront/members/<userId>' \
-H 'Authorization: Bearer $K9O_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"role": "PROJECT_ADMIN"
}'Showing example in cURL
{
"role": "PROJECT_ADMIN"
}{
"data": {
"userId": "string",
"projectId": "string",
"role": "PROJECT_ADMIN",
"email": "string",
"displayName": "string",
"invitedAt": "string",
"acceptedAt": "string",
"state": "invited"
}
}