---
title: "Unsubscribe sessions"
url: https://docs.gleap.ai/en/reference/rest-api/unsubscribe-sessions
method: POST
path: "/sessions/unsubscribe"
api: "API Reference"
tag: "Session"
operationId: "UnsubscribeSessions"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Unsubscribe sessions

`POST https://api.gleap.io/v3/sessions/unsubscribe`

Unsubscribe contacts by email and/or userId. Fire-and-forget: the response is always `{ "success": true }` and does not reflect whether the contacts were found or updated. Every session in the project matching an entry's email OR userId is unsubscribed; entries with neither field are ignored.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

- `reason` (string): Stored as Session.unsubscribeReason. Defaults to "CSV upload" when omitted.
- `sessions` (object[], required)
  - `userId` (string)
  - `email` (string)

## Example request

```bash
curl --request POST \
  --url https://api.gleap.io/v3/sessions/unsubscribe \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sessions": [
    {}
  ]
}'
```

## Responses

### 200 (`application/json`)

Ok

- `success` (boolean, required)

```json
{
  "success": true
}
```
