> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gleap.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Unsubscribe sessions

> 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.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /sessions/unsubscribe
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /sessions/unsubscribe:
    post:
      tags:
        - Session
      summary: Unsubscribe sessions
      description: >-
        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.
      operationId: UnsubscribeSessions
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                reason:
                  type: string
                  description: >-
                    Stored as Session.unsubscribeReason. Defaults to "CSV
                    upload" when omitted.
                sessions:
                  items:
                    properties:
                      userId:
                        type: string
                      email:
                        type: string
                    type: object
                  type: array
              required:
                - sessions
              type: object
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                required:
                  - success
                type: object
      security:
        - jwt: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````