UNSUB Command
Syntax
UNSUB;CLIENT_ID=client_id;EVENT_NAME=event_type
Parameters
Parameter | Description | Required | Example |
---|---|---|---|
CLIENT_ID | ID of the client unsubscribing | Yes |
|
EVENT_NAME | Type of event to unsubscribe from | Yes |
|
Response
Success
+PASS:UNSUBSCRIBED;EVENT_NAME=user/profile/updated;CLIENT_ID=client-123abc
The response includes:
EVENT_NAME
: The event type that was unsubscribed fromCLIENT_ID
: The client ID that unsubscribed
Error
-FAIL:MISSING_PARAMETERS;MESSAGE=Missing required parameters. Ensure CLIENT_ID and EVENT_NAME are passed
-FAIL:NOT_FOUND;MESSAGE=No subscription found for this client and event type
Examples
Basic Unsubscribe
UNSUB;CLIENT_ID=client-123abc;EVENT_NAME=user/profile/updated
Unsubscribe from System Event
UNSUB;CLIENT_ID=client-123abc;EVENT_NAME=system/maintenance
Notes
The UNSUB command completely removes a subscription to an event type
Any events in the processing queue for this client and event type will be returned to the pending queue
The client will no longer receive any events of the specified type
This command is the counterpart to the SUB command
To temporarily stop receiving events, use the PAUSE command instead
Last modified: 07 October 2025