# CDP User Events

> Customer Data Platform user events: identify, register, login, logout, subscribe and unsubscribe.

CDP (Customer Data Platform) user events, aligned with the Segmentify Integration SDK (`@segmentify/integration`).

### Endpoint

```
POST {baseUrl}/add/events/v1.json?apiKey={apiKey}
```

### Base URL per region

| Region | baseUrl |
| --- | --- |
| QA | `https://gandalf-qa.segmentify.com` |
| TR | `https://per2.segmentify.com` |
| EU | `https://gandalf-eu.segmentify.com` |
| LATAM | `https://gandalf-br.segmentify.com` |

### General notes

- Every event has the shape `name` + `properties`.

- The SDK adds the context fields automatically on `sendEvent` (`device`, `userId`, `sessionId`, `currency`, `lang`, `sdkVersion` and so on). The example bodies on this page include them.

- Profile events (`IdentifyUser`, `RegisterUser`, `LoginUser`, `LogoutUser`) are not sent with empty `properties`.

- If at least one consent field is present, the SDK fills the missing consent fields with `NOT_SET`.

### SDK method → event name

| SDK method | Event `name` |
| --- | --- |
| `IdentifyUser` | `USER_IDENTIFY` |
| `RegisterUser` | `USER_REGISTER` |
| `LoginUser` | `USER_LOGIN` |
| `LogoutUser` | `USER_LOGOUT` |
| `SubscribeUser` | `USER_SUBSCRIBE` |
| `UnsubscribeUser` | `USER_UNSUBSCRIBE` |

## Profile Events

Profile events, which share the `CdpEventsPayload` type.

#### CdpEventsPayload fields

| Field | Type | Required | Description |
|---|---|---|---|
| `phone` | string | No | Phone number |
| `email` | string | No | Email address |
| `username` | string | No | Username |
| `source` | string | No | Source (for example `email-collection`) |
| `gender` | string | No | Gender |
| `fullName` | string | No | Full name |
| `callConsent` | enum | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` |
| `emailConsent` | enum | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` |
| `whatsappConsent` | enum | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` |
| `smsConsent` | enum | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` |
| *(extra key)* | string \| number \| boolean | No | Custom trait (for example `loyalty_level`) |

#### Consent behavior

1. If `properties` is empty, the event is **not sent**.
2. If **at least one** consent field is present, the missing consent fields are set to `NOT_SET`.
3. If no consent field is present, the payload is sent as it is.

### Identify User

#### IdentifyUser → `USER_IDENTIFY`

Sends a snapshot of the user's identity and traits when the profile changes. If the profile has not changed, the SDK **skips** the event (deduplication).

##### SDK method

```ts
await segmentify.Events.IdentifyUser(params: CdpEventsPayload)

 ```

##### Behavior notes

- Consent defaults are applied (`withConsentDefaults`).

- An empty payload is not sent.

- A profile identical to the last one sent successfully is not sent again (deduplication).

- After a successful send the profile snapshot is stored; on an error the in-flight reservation is cleared.

##### `properties` parameters

| Parameter | Type | Required | Enum / Example | Description |
| --- | --- | --- | --- | --- |
| `email` | string | No | `user@example.com` | Email |
| `phone` | string | No | `905551234567` | Phone (`phone`, not `phoneNumber`) |
| `username` | string | No | `johndoe` | Username |
| `fullName` | string | No | `John Doe` | Full name |
| `gender` | string | No | `male` | Gender |
| `source` | string | No | `email-collection` | Data source |
| `callConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | Call consent |
| `emailConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | Email consent |
| `whatsappConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | WhatsApp consent |
| `smsConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | SMS consent |
| _(extra)_ | string/number/boolean | No | `loyalty_level: "gold"` | Free-form trait fields |

##### Context fields (added automatically by the SDK)

| Field | Type | Description |
| --- | --- | --- |
| `device` | string | `PC` \| `mobile` \| `tablet` |
| `userId` | string | Segmentify user ID |
| `sessionId` | string | Session ID |
| `referrer` | string | Referrer URL |
| `pageUrl` | string | Page URL |
| `userAgent` | string | User-Agent |
| `currency` | string | Currency |
| `lang` | string | Language |
| `sdkVersion` | string | SDK version |
| `os` / `osversion` | string | Operating system |
| `browser` | string | Browser |
| `dnp` | string | Do-not-personalize |
| `testMode` | string | Test mode |
| `region` | string | Optional region |

**Example body**

```json
{
  "name": "USER_IDENTIFY",
  "properties": {
    "email": "user@example.com",
    "username": "johndoe",
    "phone": "905551234567",
    "gender": "male",
    "callConsent": "SUBSCRIBED",
    "emailConsent": "UNSUBSCRIBED",
    "whatsappConsent": "NOT_SET",
    "smsConsent": "SUBSCRIBED",
    "source": "email-collection",
    "fullName": "John Doe",
    "loyalty_level": "gold"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "referrer": "",
  "pageUrl": "https://www.example.com/account",
  "userAgent": "Mozilla/5.0",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0",
  "os": "Android",
  "osversion": "14",
  "browser": "Chrome",
  "dnp": "false",
  "testMode": "false"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Profile Events / Identify User** in the request body examples of *Send events*.
:::


### Traits User

Sends the `USER_TRAITS` event with the user's profile `properties` and `segments`. The `properties` object takes the same fields as [Identify User](#identify-user).

**Example body**

```json
{
  "name": "USER_TRAITS",
  "properties": {
    "email": "user@example.com",
    "username": "johndoe",
    "phone": "905551234567",
    "gender": "male",
    "callConsent": "SUBSCRIBED",
    "emailConsent": "UNSUBSCRIBED",
    "whatsappConsent": "NOT_SET",
    "smsConsent": "SUBSCRIBED",
    "source": "email-collection",
    "fullName": "John Doe",
    "loyalty_level": "gold",
    "segments": [
      "vip-customers"
    ]
  },
  "segments": [
    "vip-customers"
  ],
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "referrer": "",
  "pageUrl": "https://www.example.com/account",
  "userAgent": "Mozilla/5.0",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0",
  "os": "Android",
  "osversion": "14",
  "browser": "Chrome",
  "dnp": "false",
  "testMode": "false"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Profile Events / Traits User** in the request body examples of *Send events*.
:::


### Register User

#### RegisterUser → `USER_REGISTER`

Sent when a user completes registration (signup). It creates the CDP profile and is separate from the older `USER_OPERATIONS` / `signup` event.

##### SDK method

```ts
await segmentify.Events.RegisterUser(params: CdpEventsPayload)
```

##### Behavior notes

- Consent defaults are applied.
- An empty payload is not sent.
- No deduplication: it is sent on every call (unlike IdentifyUser).

##### `properties` parameters

| Parameter | Type | Required | Enum / Example | Description |
|---|---|---|---|---|
| `email` | string | No | `user@example.com` | Email |
| `phone` | string | No | `905551234567` | Phone |
| `username` | string | No | `johndoe` | Username |
| `fullName` | string | No | `John Doe` | Full name |
| `gender` | string | No | `male` | Gender |
| `source` | string | No | `email-collection` | Data source |
| `callConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | Call consent |
| `emailConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | Email consent |
| `whatsappConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | WhatsApp consent |
| `smsConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | SMS consent |
| *(extra)* | string/number/boolean | No | `loyalty_level: "gold"` | Free-form trait fields |

**Example body**

```json
{
  "name": "USER_REGISTER",
  "properties": {
    "email": "user@example.com",
    "username": "johndoe",
    "phone": "905551234567",
    "gender": "male",
    "callConsent": "SUBSCRIBED",
    "emailConsent": "UNSUBSCRIBED",
    "whatsappConsent": "NOT_SET",
    "smsConsent": "SUBSCRIBED",
    "source": "email-collection",
    "fullName": "John Doe",
    "loyalty_level": "gold"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "referrer": "",
  "pageUrl": "https://www.example.com/register",
  "userAgent": "Mozilla/5.0",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0",
  "os": "Android",
  "osversion": "14",
  "browser": "Chrome",
  "dnp": "false",
  "testMode": "false"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Profile Events / Register User** in the request body examples of *Send events*.
:::


### Login User

#### LoginUser → `USER_LOGIN`

Sent when a user logs in. Typically `email` (or another identifying field) is enough.

##### SDK method

```ts
await segmentify.Events.LoginUser(params: CdpEventsPayload)
```

##### Behavior notes

- Consent defaults are applied.
- An empty payload is not sent.
- No deduplication.

##### `properties` parameters

| Parameter | Type | Required | Enum / Example | Description |
|---|---|---|---|---|
| `email` | string | No* | `user@example.com` | Email (*recommended in practice) |
| `phone` | string | No | `905551234567` | Phone |
| `username` | string | No | `johndoe` | Username |
| `fullName` | string | No | `John Doe` | Full name |
| `gender` | string | No | `male` | Gender |
| `source` | string | No | `login-form` | Data source |
| `callConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | Call consent |
| `emailConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | Email consent |
| `whatsappConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | WhatsApp consent |
| `smsConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | SMS consent |
| *(extra)* | string/number/boolean | No | — | Free-form trait fields |

**Example body**

```json
{
  "name": "USER_LOGIN",
  "properties": {
    "email": "user@example.com"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "referrer": "",
  "pageUrl": "https://www.example.com/login",
  "userAgent": "Mozilla/5.0",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0",
  "os": "Android",
  "osversion": "14",
  "browser": "Chrome",
  "dnp": "false",
  "testMode": "false"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Profile Events / Login User** in the request body examples of *Send events*.
:::


### Logout User

#### LogoutUser → `USER_LOGOUT`

Sent when a user logs out.

##### SDK method

```ts
await segmentify.Events.LogoutUser(params: CdpEventsPayload)
```

##### Behavior notes

- Consent defaults are applied.
- An empty payload is not sent.
- No deduplication.

##### `properties` parameters

| Parameter | Type | Required | Enum / Example | Description |
|---|---|---|---|---|
| `email` | string | No* | `user@example.com` | Email (*recommended in practice) |
| `phone` | string | No | `905551234567` | Phone |
| `username` | string | No | `johndoe` | Username |
| `fullName` | string | No | `John Doe` | Full name |
| `gender` | string | No | `male` | Gender |
| `source` | string | No | `logout` | Data source |
| `callConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | Call consent |
| `emailConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | Email consent |
| `whatsappConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | WhatsApp consent |
| `smsConsent` | string | No | `SUBSCRIBED` \| `UNSUBSCRIBED` \| `NOT_SET` | SMS consent |
| *(extra)* | string/number/boolean | No | — | Free-form trait fields |

**Example body**

```json
{
  "name": "USER_LOGOUT",
  "properties": {
    "email": "user@example.com"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "referrer": "",
  "pageUrl": "https://www.example.com/logout",
  "userAgent": "Mozilla/5.0",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0",
  "os": "Android",
  "osversion": "14",
  "browser": "Chrome",
  "dnp": "false",
  "testMode": "false"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Profile Events / Logout User** in the request body examples of *Send events*.
:::


## Channel Subscription

Channel subscribe and unsubscribe events.

The `channel` field is the discriminator: the required fields depend on the channel.

#### Channel enum

| Value | Description |
|---|---|
| `web_push` | Web Push / FCM |
| `email` | Email |
| `whatsapp` | WhatsApp |
| `sms` | SMS |
| `call` | Call |

#### Purpose enum (email only)

`MARKETING` | `TRANSACTIONAL` | `PERSONALISATION` | `ALL`

#### Required fields for subscribe

| channel | Required fields |
|---|---|
| `web_push` | `pushSubscriptionId`, `auth`, `p256dh`, `fcmToken`, `endPoint` |
| `email` | `email`, `purpose[]` |
| `whatsapp` / `sms` / `call` | `phone` |

#### Required fields for unsubscribe

| channel | Required fields |
|---|---|
| `web_push` | `channel` only |
| `email` | `channel`, `email` (+ optional `purpose[]`) |
| `whatsapp` / `sms` / `call` | `channel`, `phone` |

**Field name:** the phone field must be `phone` (not `phoneNumber`).

### Subscribe — Web Push

#### SubscribeUser → `USER_SUBSCRIBE` (channel: `web_push`)

Sent when a user subscribes to the Web Push / FCM channel.

##### SDK method

```ts
await segmentify.Events.SubscribeUser({
  channel: 'web_push',
  pushSubscriptionId: '...',
  auth: '...',
  p256dh: '...',
  fcmToken: '...',
  endPoint: '...'
})
```

##### `properties` parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Fixed: `web_push` |
| `pushSubscriptionId` | string | Yes | Push subscription ID |
| `auth` | string | Yes | Push auth key |
| `p256dh` | string | Yes | Push p256dh key |
| `fcmToken` | string | Yes | FCM token |
| `endPoint` | string | Yes | Push endpoint URL |

**Example body**

```json
{
  "name": "USER_SUBSCRIBE",
  "properties": {
    "channel": "web_push",
    "pushSubscriptionId": "fcm_token_abc123_xyz",
    "auth": "auth_token_example",
    "p256dh": "p256dh_key_example",
    "fcmToken": "fcm_token_example",
    "endPoint": "https://fcm.googleapis.com/fcm/send/example"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Subscribe — Web Push** in the request body examples of *Send events*.
:::


### Subscribe — Email

#### SubscribeUser → `USER_SUBSCRIBE` (channel: `email`)

Sent when a user subscribes to the email channel.

##### SDK method

```ts
await segmentify.Events.SubscribeUser({
  channel: 'email',
  email: 'test@email.com',
  purpose: ['MARKETING']
})
```

##### `properties` parameters

| Parameter | Type | Required | Enum / Example | Description |
|---|---|---|---|---|
| `channel` | string | Yes | `email` | Channel |
| `email` | string | Yes | `test@email.com` | Subscriber email |
| `purpose` | string[] | Yes | `MARKETING` \| `TRANSACTIONAL` \| `PERSONALISATION` \| `ALL` | List of purposes (JSON array) |

**Note:** `purpose` must be an **array**, not a single string.

**Example body**

```json
{
  "name": "USER_SUBSCRIBE",
  "properties": {
    "channel": "email",
    "email": "user@example.com",
    "purpose": [
      "MARKETING"
    ],
    "doNotSendWelcomeEmail": false
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Subscribe — Email** in the request body examples of *Send events*.
:::


### Subscribe — WhatsApp

#### SubscribeUser → `USER_SUBSCRIBE` (channel: `whatsapp`)

Sent when a user subscribes to the WhatsApp channel.

##### SDK method

```ts
await segmentify.Events.SubscribeUser({
  channel: 'whatsapp',
  phone: '905551234567'
})
```

##### `properties` parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Fixed: `whatsapp` |
| `phone` | string | Yes | Phone number (`phone`, not `phoneNumber`) |

**Example body**

```json
{
  "name": "USER_SUBSCRIBE",
  "properties": {
    "channel": "whatsapp",
    "phone": "905551234567"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Subscribe — WhatsApp** in the request body examples of *Send events*.
:::


### Subscribe — SMS

#### SubscribeUser → `USER_SUBSCRIBE` (channel: `sms`)

Sent when a user subscribes to the SMS channel.

##### SDK method

```ts
await segmentify.Events.SubscribeUser({
  channel: 'sms',
  phone: '905551234567'
})
```

##### `properties` parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Fixed: `sms` |
| `phone` | string | Yes | Phone number |

**Example body**

```json
{
  "name": "USER_SUBSCRIBE",
  "properties": {
    "channel": "sms",
    "phone": "905551234567"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Subscribe — SMS** in the request body examples of *Send events*.
:::


### Subscribe — Call

#### SubscribeUser → `USER_SUBSCRIBE` (channel: `call`)

Sent when a user subscribes to the call channel.

##### SDK method

```ts
await segmentify.Events.SubscribeUser({
  channel: 'call',
  phone: '905551234567'
})
```

##### `properties` parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Fixed: `call` |
| `phone` | string | Yes | Phone number |

**Example body**

```json
{
  "name": "USER_SUBSCRIBE",
  "properties": {
    "channel": "call",
    "phone": "905551234567"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Subscribe — Call** in the request body examples of *Send events*.
:::


### Unsubscribe — Web Push

#### UnsubscribeUser → `USER_UNSUBSCRIBE` (channel: `web_push`)

Sent when a user cancels the Web Push subscription. Only `channel` is needed.

##### SDK method

```ts
await segmentify.Events.UnsubscribeUser({ channel: 'web_push' })
```

##### `properties` parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Fixed: `web_push` |
| `email` | string | No | Not used for this channel |
| `phone` | string | No | Not used for this channel |
| `purpose` | string[] | No | Not used for this channel |

**Example body**

```json
{
  "name": "USER_UNSUBSCRIBE",
  "properties": {
    "channel": "web_push"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Unsubscribe — Web Push** in the request body examples of *Send events*.
:::


### Unsubscribe — Email

#### UnsubscribeUser → `USER_UNSUBSCRIBE` (channel: `email`)

Sent when a user cancels the email subscription.

##### SDK method

```ts
await segmentify.Events.UnsubscribeUser({
  channel: 'email',
  email: 'test@email.com',
  purpose: ['MARKETING'] // optional
})
```

##### `properties` parameters

| Parameter | Type | Required | Enum / Example | Description |
|---|---|---|---|---|
| `channel` | string | Yes | `email` | Channel |
| `email` | string | Yes | Email address being unsubscribed |
| `purpose` | string[] | No | `MARKETING` \| `TRANSACTIONAL` \| `PERSONALISATION` \| `ALL` | Purpose(s) being cancelled |
| `phone` | string | No | — | Not used for this channel |

**Example body**

```json
{
  "name": "USER_UNSUBSCRIBE",
  "properties": {
    "channel": "email",
    "email": "user@example.com",
    "purpose": [
      "MARKETING"
    ]
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Unsubscribe — Email** in the request body examples of *Send events*.
:::


### Unsubscribe — WhatsApp

#### UnsubscribeUser → `USER_UNSUBSCRIBE` (channel: `whatsapp`)

Sent when a user cancels the WhatsApp subscription.

##### SDK method

```ts
await segmentify.Events.UnsubscribeUser({
  channel: 'whatsapp',
  phone: '905551234567'
})
```

##### `properties` parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Fixed: `whatsapp` |
| `phone` | string | Yes | Phone number |

**Example body**

```json
{
  "name": "USER_UNSUBSCRIBE",
  "properties": {
    "channel": "whatsapp",
    "phone": "905551234567"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Unsubscribe — WhatsApp** in the request body examples of *Send events*.
:::


### Unsubscribe — SMS

#### UnsubscribeUser → `USER_UNSUBSCRIBE` (channel: `sms`)

Sent when a user cancels the SMS subscription.

##### SDK method

```ts
await segmentify.Events.UnsubscribeUser({
  channel: 'sms',
  phone: '905551234567'
})
```

##### `properties` parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Fixed: `sms` |
| `phone` | string | Yes | Phone number |

**Example body**

```json
{
  "name": "USER_UNSUBSCRIBE",
  "properties": {
    "channel": "sms",
    "phone": "905551234567"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Unsubscribe — SMS** in the request body examples of *Send events*.
:::


### Unsubscribe — Call

#### UnsubscribeUser → `USER_UNSUBSCRIBE` (channel: `call`)

Sent when a user cancels the call subscription.

##### SDK method

```ts
await segmentify.Events.UnsubscribeUser({
  channel: 'call',
  phone: '905551234567'
})
```

##### `properties` parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | Yes | Fixed: `call` |
| `phone` | string | Yes | Phone number |

**Example body**

```json
{
  "name": "USER_UNSUBSCRIBE",
  "properties": {
    "channel": "call",
    "phone": "905551234567"
  },
  "device": "mobile",
  "userId": "1234567890123456789",
  "sessionId": "9876543210987654321",
  "currency": "EUR",
  "lang": "EN",
  "sdkVersion": "1.0.0"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **CDP User Events / Channel Subscription / Unsubscribe — Call** in the request body examples of *Send events*.
:::
