CentralCSP
APIMembers

Update a member

Changes a member's workspace role. The owner's membership cannot be changed, and only the owner can grant or take away the admin role.

Requires the admin role on the workspace.

PATCH
/v1/workspaces/{workspaceId}/members/{memberId}

Authorization

headerAuthorizationBearer <JWT>

An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.

Path Parameters

workspaceId*string

The workspace's id.

memberId*string

The membership's id, not the user's id.

Request Body

application/json
  1. body
role?MemberRole

member is a regular collaborator. admin can also administer the workspace, its members, and its websites.

Value in"admin""member"

Response Body

A member of a workspace.

application/json
  1. response
id*string

Identifier of the membership. Use this wherever an endpoint asks for a memberId.

workspaceId*string

The workspace's id.

userId*string

Identifier of the person behind the membership, stable across workspaces.

role*MemberRole

member is a regular collaborator. admin can also administer the workspace, its members, and its websites.

Value in"admin""member"
email*|

Email address. This and the other profile fields are null until the person signs in for the first time.

firstName*|

Given name.

lastName*|

Family name.

picture*|

Avatar URL, or null when they have none.

createdAt*string

When the person joined the workspace.

Formatdate-time
updatedAt*string

When the membership was last changed.

Formatdate-time
Example Request
curl -X PATCH 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/members/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "workspaceId": "string",  "userId": "string",  "role": "admin",  "email": "string",  "firstName": "string",  "lastName": "string",  "picture": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}