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

# Unsubscribe

> Unsubscriber a user from one or more active subscriptions



## OpenAPI

````yaml /api-reference/customer-service-api/paysight_customer_service_api.yaml post /unsubscribe
openapi: 3.0.0
info:
  title: Paysight Customer Service API
  description: Customer Service API for searching transations, refunding etc
  version: 1.0.0
  contact:
    email: tech@paysight.io
servers:
  - description: Paysight Cards API
    url: https://test.paysight.io/customerapi/
security:
  - ApiKeyAuth: []
paths:
  /unsubscribe:
    post:
      summary: Unsubscribe
      description: Unsubscriber a user from one or more active subscriptions
      parameters:
        - $ref: '#/components/parameters/ClientId'
        - $ref: '#/components/parameters/UserEmail'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnsubscribeRequest'
        description: Payload
      responses:
        '200':
          description: Valid Request. More detailed info will be in the JSON body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsubscribeResponse'
components:
  parameters:
    ClientId:
      name: ClientId
      in: header
      required: true
      description: >-
        Your Paysight Tenant/Client Id. This is the id of the parent company
        listed in https://app.paysight.io/management/companies. Alternatively,
        this will be provided by Paysight
      schema:
        type: string
    UserEmail:
      name: UserEmail
      in: header
      required: true
      description: The email address of the party or group making the request
      schema:
        type: string
  schemas:
    UnsubscribeRequest:
      type: object
      required:
        - parentCompanyId
        - userEmail
        - orderIds or subscriberIds
      properties:
        parentCompanyId:
          type: integer
          example: 1
          description: Your Paysight tenant id. This will be provided by Paysight.
        userEmail:
          type: string
          format: email
          description: An email associated with the party/agent making the request
          example: care@yourdomain.com
        email:
          type: string
          format: email
          example: joe@blogs.com
          description: The email address of the customer. This is required
        orderIds:
          type: array
          description: >-
            The related orderId or orderIds that initiated the user subscription
            or subscriptions
          example: '[9382721,282262]'
          items:
            type: integer
        subscriberIds:
          type: array
          description: The specific identifer for the user subscription(s)
          example: '[123455,123456]'
          items:
            type: integer
        sendUserCommunication:
          type: boolean
          description: >-
            If true, then Paysight will send a confirmation to the user's email
            address (if mail settings are set up)
          example: false
    UnsubscribeResponse:
      type: object
      required:
        - success
        - unsubscribes
      properties:
        success:
          type: boolean
          description: Indicates if user was successfully unsubscribed
          example: true
        message:
          type: string
          example: ''
          description: Debug information
        unsubscribes:
          type: integer
          example: 1
          description: Number of successful unsubscribes
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your Paysight API key. You can find it in your Paysight account at
        https://app.paysight.io/settings/account

````