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

# List unsubscribers

> Returns a paginated list of unsubscribers.



## OpenAPI

````yaml /openapi/endpoints/ycloud-api-v2.yaml get /unsubscribers
openapi: 3.0.0
info:
  description: >-
    The [YCloud](https://ycloud.com) API is organized around
    [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). Our
    API is designed to have predictable, resource-oriented URLs, return
    [JSON](https://www.json.org) responses, and use standard HTTP response codes
    and verbs.
  version: v2
  title: YCloud API
  termsOfService: https://ycloud.com/terms-service
  contact:
    email: service@ycloud.com
servers:
  - url: https://api.ycloud.com/v2
    description: Base URL
security:
  - api_key: []
tags:
  - name: Balance
  - name: Contacts
  - name: Custom Events
  - name: Emails
  - name: SMS
  - name: Unsubscribers
  - name: Verify
  - name: Voices
  - name: Webhook Endpoints
  - name: WhatsApp Business Accounts
  - name: WhatsApp Inbound Messages
  - name: WhatsApp Media
  - name: WhatsApp Messages
  - name: WhatsApp Blocked Users
  - name: WhatsApp Groups
  - name: WhatsApp Calling
  - name: WhatsApp Phone Numbers
  - name: WhatsApp Templates
  - name: WhatsApp Flows
  - name: Meta Business Agent
  - name: WhatsApp Group Messages
externalDocs:
  description: Homepage
  url: https://ycloud.com
paths:
  /unsubscribers:
    get:
      tags:
        - Unsubscribers
      summary: List unsubscribers
      description: Returns a paginated list of unsubscribers.
      operationId: unsubscriber-list
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/includeTotal'
        - $ref: '#/components/parameters/pageAfter'
        - name: filter.customer
          in: query
          schema:
            type: string
            description: The customer who has opted out.
            example: '+16315551111'
        - name: filter.channel
          in: query
          schema:
            $ref: '#/components/schemas/UnsubscriberChannel'
        - name: filter.regionCode
          in: query
          schema:
            type: string
            description: >-
              Region code, formatted in [ISO 3166-1 alpha-2 country
              code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
      responses:
        '200':
          description: Successfully retrieved a paginated list of objects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsubscriberPage'
components:
  parameters:
    page:
      name: page
      in: query
      description: Page number of the results to be returned, 1-based.
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        default: 1
    limit:
      name: limit
      in: query
      description: >-
        A limit on the number of results to be returned, or number of results
        per page, between 1 and 100, defaults to 10.
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        default: 10
    includeTotal:
      name: includeTotal
      in: query
      description: >-
        Return results inside an object that contains the total result count or
        not.
      required: false
      schema:
        type: boolean
        default: false
    pageAfter:
      name: pageAfter
      in: query
      description: >-
        A cursor to fetch the next page in cursor pagination.

        For example, if you make a list request, receive 100 objects and
        `cursor.after=id:foo`, your subsequent call can include
        `pageAfter=id:foo` in order to fetch the next page of the list.
      required: false
      schema:
        type: string
        example: id:foo
  schemas:
    UnsubscriberChannel:
      type: string
      description: >-
        Channel of unsubscriber.

        - `whatsapp`: Indicates that the customer opts out of receiving WhatsApp
        messages from your business.
      enum:
        - whatsapp
    UnsubscriberPage:
      type: object
      description: Represents a given page of unsubscriber objects.
      allOf:
        - $ref: '#/components/schemas/Page'
      properties:
        items:
          description: An array containing unsubscriber objects.
          type: array
          items:
            $ref: '#/components/schemas/Unsubscriber'
        cursor:
          $ref: '#/components/schemas/PageCursor'
    Page:
      type: object
      description: Represents a given page of items.
      required:
        - offset
        - limit
        - length
      properties:
        offset:
          description: >-
            The position of the item this page starts from, zero-based. e.g.,
            the 11th item is at offset 10.
          type: integer
          format: int32
          minimum: 0
        limit:
          description: >-
            A limit on the number of items to be returned, between 1 and 100,
            defaults to 10.
          type: integer
          format: int32
          minimum: 1
        length:
          description: The actual number of items in the page.
          type: integer
          format: int32
          minimum: 0
        total:
          description: >-
            The total number of items. This field is returned only when the
            request parameter `includeTotal` is set to `true`.
          type: integer
          format: int32
          minimum: 0
        items:
          type: array
          items:
            type: object
    Unsubscriber:
      type: object
      description: >-
        An unsubscriber is a configuration item representing that customers opt
        out of receiving messages from your business.

        **A customer and a channel form a unique identifier for an
        unsubscriber.**
      properties:
        type:
          $ref: '#/components/schemas/UnsubscriberType'
        customer:
          type: string
          description: >-
            The customer who has opted out.

            For `type=PHONE_NUMBER`, it should be a phone number in
            [E.164](https://en.wikipedia.org/wiki/E.164) format.
          example: '+16315551111'
        channel:
          $ref: '#/components/schemas/UnsubscriberChannel'
        regionCode:
          type: string
          description: >-
            The customer's region code, formatted in [ISO 3166-1 alpha-2 country
            code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
          example: US
        source:
          type: string
          description: >-
            The source from which a customer resumed their subscription

            - `Whatsapp`: The customer resumed their subscription on the
            whatsapp client

            - `API`: You remove the customer from the unsubscribe list through
            the OpenAPI of YCloud

            - `Manual`: You remove the customer from the unsubscribe list on the
            Contact page of YCloud.
          enum:
            - Whatsapp
            - API
            - Manual
          example: Whatsapp
        createTime:
          type: string
          format: date-time
          description: >-
            The time at which this object was created, formatted in [RFC
            3339](https://datatracker.ietf.org/doc/html/rfc3339). e.g.,
            `2022-06-01T12:00:00.000Z`.
          example: '2022-06-01T12:00:00.000Z'
    PageCursor:
      type: object
      description: >-
        A cursor object is returned only if the endpoint you requested supports
        cursor pagination.
      properties:
        after:
          type: string
          description: >-
            A cursor to fetch the next page in cursor pagination.

            For example, if you make a list request, receive 100 objects and
            `cursor.after=id:foo`, your subsequent call can include
            `pageAfter=id:foo` in order to fetch the next page of the list.

            This field is returned only if there are more items in the list.
          example: id:foo
    UnsubscriberType:
      type: string
      description: >-
        Type of unsubscriber.

        - `PHONE_NUMBER`: Indicates that the `customer` is a phone number in
        [E.164](https://en.wikipedia.org/wiki/E.164) format.
      enum:
        - PHONE_NUMBER
  securitySchemes:
    api_key:
      type: apiKey
      name: X-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.