Skip to main content

Unsubscribe

You can stop receiving events of a specific subscription by sending an unsubscribe request along with its subscriptionId.

Path

channels:unsubscribe

Request Body

subscriptionId
string
Required
ID of the subscription you want to stop receiving events from.

Response codes

CodeMeaningDescription
200OKSuccess. You will no longer receive events from this subscription
404Not FoundThe specified subscription ID does not exist.

Example

// Request
{ "id": 1, "path": "auth:token", "body": { "token": "YOUR_TOKEN" } }

// Response
{ "id": 1, "path": "auth:token", "status": 200 }

// Request
{ "path": "channels:subscribe", "body": {"channel":"session_emotions_counts","key":"66151895e00a857bd76f889d:10s"} }

// Response
{ "id": null, "path": "channels:subscribe", "status": 200, "body": {"subscriptionId":"luug96xrbbc594"} }

// Events
[ "luug96xrbbc594", 1712794471965, "sec", [{ "exaltation": 11, "focus": 8 }] ]
{...}

// Request
{ "path": "channels:unsubscribe", "body": {"subscriptionId":"luug96xrbbc594"} }

// Response
{ "id": null, "path": "channels:unsubscribe", "status": 200, "body": {} }