---
schema_version: "1"
id: f2f2cf63ae6939b847935bb86ae801a4b05fdd706c0edcdefa80b1da4993771a
title: Unsubscribe
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_subscriberUnsubscribe.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_subscriberUnsubscribe.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 25b3613bcf1e40750a5155f76bb2d0ab2cfa6703198cf82435066763d92fd2c6
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Unsubscribe

Sets a subscriber's status to Unsubscribed.

## Syntax

`Unsubscribe()`

## Example

To use the `Unsubscribe()` function, you must first initialize the subscriber object. Next, call the `Unsubscribe()` function on the initialized object.

```js
var subObj = Subscriber.Init("SubKey");
var status = subObj.Unsubscribe();
```
