Update a workspace member
curl --request PATCH \
--url https://{platformHost}/api/public/v1/workspaces/{workspaceId}/members/{memberId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"roleId": "builtin.workspace.workbench_manager",
"externalId": "00u1abcd2345"
}
'{
"success": true,
"data": {
"memberId": "0193f1c2-7a4e-7b10-9c3d-5e6f7a8b9c0d",
"role": {
"roleId": "builtin.workspace.restricted_member",
"name": "RESTRICTED_MEMBER",
"type": "system",
"source": "direct"
},
"status": "pending",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"revision": 1,
"userId": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"attributes": {},
"assignmentSource": "api",
"projects": [
{
"id": "<string>",
"role": {
"roleId": "builtin.workspace.restricted_member",
"name": "RESTRICTED_MEMBER",
"type": "system",
"source": "direct"
},
"name": "<string>"
}
],
"projectsTruncated": true
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}Update a workspace member
Change a workspace member’s role or external ID.
PATCH
/
api
/
public
/
v1
/
workspaces
/
{workspaceId}
/
members
/
{memberId}
Update a workspace member
curl --request PATCH \
--url https://{platformHost}/api/public/v1/workspaces/{workspaceId}/members/{memberId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"roleId": "builtin.workspace.workbench_manager",
"externalId": "00u1abcd2345"
}
'{
"success": true,
"data": {
"memberId": "0193f1c2-7a4e-7b10-9c3d-5e6f7a8b9c0d",
"role": {
"roleId": "builtin.workspace.restricted_member",
"name": "RESTRICTED_MEMBER",
"type": "system",
"source": "direct"
},
"status": "pending",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"revision": 1,
"userId": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"attributes": {},
"assignmentSource": "api",
"projects": [
{
"id": "<string>",
"role": {
"roleId": "builtin.workspace.restricted_member",
"name": "RESTRICTED_MEMBER",
"type": "system",
"source": "direct"
},
"name": "<string>"
}
],
"projectsTruncated": true
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "<string>",
"messages": [
"<string>"
],
"retryable": true,
"details": {}
}
}externalId, or do both. A member has one workspace role. Send at least one field, or the API returns 400 NO_FIELDS_TO_UPDATE. If nothing would change, the API returns 409 ROLE_UNCHANGED. An externalId that another member of the workspace already uses returns 409 EXTERNAL_ID_CONFLICT.
To avoid overwriting a concurrent change, send the ETag from your last read in the If-Match header. A mismatch returns 412 PRECONDITION_FAILED. Send an Idempotency-Key header so retries are safe. The request needs the workspace.members.write scope.Authorizations
platformApiKeybearerPlatformKey
Headers
Recommended on every write. A retry with the same key and body replays the first result instead of repeating the change. A different body returns 422 IDEMPOTENCY_KEY_REUSED; a retry while the first is still running returns 409 IDEMPOTENCY_IN_PROGRESS.
Required string length:
1 - 255Path Parameters
Body
application/json
Was this page helpful?