User activation state
The user:activation_state event fires when a user is deactivated (soft-deleted) or reactivated via the server API. Use this event to keep your app server in sync with user account states.
For the complete webhook setup and signature verification guide, see Webhooks overview.
Event type
user:activation_state
Payload
Envelope
| Field | Type | Required | Description |
|---|---|---|---|
type | String | Yes | "user:activation_state" |
id | String | Yes | Unique event ID. |
time | Long | Yes | Event generation time (Unix ms). |
data | Array | Yes | Array containing one activation state object. See Data fields. |
Data fields
| Field | Type | Required | Description |
|---|---|---|---|
userId | String | Yes | The user ID. |
operateId | String | Yes | Unique operation identifier. Matches the identifier returned by the deactivate or reactivate API call that triggered the event. |
operationType | Int | Yes | Operation type. 0 = deactivated. 1 = reactivated. |
code | String | Yes | Result code. "0" indicates success. |
time | Long | Yes | Time the operation was performed (Unix ms). |
Operation types
| Value | Meaning |
|---|---|
0 | Deactivated — The user account was soft-deleted via the server API. All personal data stored for the user is permanently deleted and cannot be recovered. The user ID is retained, but the user cannot connect while deactivated. |
1 | Reactivated — A previously deactivated user account was restored. |
Example
JSON
{
"type": "user:activation_state",
"id": "550e8400-e29b-41d4-a716-446655440002",
"time": 1730192400000,
"data": [
{
"userId": "user_001",
"operateId": "op_20241029_001",
"operationType": 0,
"code": "0",
"time": 1730192400000
}
]
}