Apply a workspace member lifecycle action
curl --request POST \
--url https://{platformHost}/api/public/v1/workspaces/{workspaceId}/members/{memberId}/actions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"action": "suspend",
"reason": "Leave of absence"
}
'{
"success": true,
"data": {
"member": {
"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
},
"action": "deactivate",
"previousStatus": "<string>",
"warnings": [
"INVITE_EMAIL_QUEUED"
]
}
}{
"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": {}
}
}Apply a workspace member lifecycle action
Apply a lifecycle action, such as suspend, reactivate, or reset MFA, to a workspace member.
POST
/
api
/
public
/
v1
/
workspaces
/
{workspaceId}
/
members
/
{memberId}
/
actions
Apply a workspace member lifecycle action
curl --request POST \
--url https://{platformHost}/api/public/v1/workspaces/{workspaceId}/members/{memberId}/actions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"action": "suspend",
"reason": "Leave of absence"
}
'{
"success": true,
"data": {
"member": {
"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
},
"action": "deactivate",
"previousStatus": "<string>",
"warnings": [
"INVITE_EMAIL_QUEUED"
]
}
}{
"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": {}
}
}deactivate, suspend, reactivate, reset_mfa, revoke_sessions, and resend_invite. This API request updates only a single workspace. The request needs the workspace.members.write scope. Send an optional reason of up to 500 characters. A successful response returns the updated member and the previous status.
The platform allows a maximum of 10 actions per hour per member.
| Action | Allowed from status | Result |
|---|---|---|
deactivate | active, suspended, locked | The status becomes deactivated. Workspace sessions end. |
suspend | active | The status becomes suspended. Workspace sessions end. |
reactivate | suspended, deactivated, locked | The status becomes active. A sign-in lockout returns 409 LOCKED_BY_LOGIN_LOCKOUT. |
reset_mfa | active, locked | MFA enrollment is cleared. |
revoke_sessions | active, suspended, locked | Workspace sessions end. The status doesn’t change. |
resend_invite | pending, expired | A new invitation is sent and its expiry restarts. |
409 INVALID_STATE_TRANSITION.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?