Skip to main content

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

FieldTypeRequiredDescription
typeStringYes"user:activation_state"
idStringYesUnique event ID.
timeLongYesEvent generation time (Unix ms).
dataArrayYesArray containing one activation state object. See Data fields.

Data fields

FieldTypeRequiredDescription
userIdStringYesThe user ID.
operateIdStringYesUnique operation identifier. Matches the identifier returned by the deactivate or reactivate API call that triggered the event.
operationTypeIntYesOperation type. 0 = deactivated. 1 = reactivated.
codeStringYesResult code. "0" indicates success.
timeLongYesTime the operation was performed (Unix ms).

Operation types

ValueMeaning
0Deactivated — 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.
1Reactivated — 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
}
]
}