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

# Fetch User list subscriptions

> API to retrieve all lists that a user is part of.



## OpenAPI

````yaml GET /v1/user/{distinct_id}/subscribed_to/list/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v1/user/{distinct_id}/subscribed_to/list/:
    get:
      summary: Fetch User list subscriptions
      description: API to retrieve all lists that a user is part of.
      operationId: fetch-user-list-subscriptions
      parameters:
        - name: distinct_id
          in: path
          description: Unique identifier of the user in your system
          schema:
            type: string
          required: true
        - name: limit
          in: query
          description: number of results to be returned in API response
          required: false
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: 200 - OK
          content:
            application/json:
              examples:
                Result:
                  value:
                    meta:
                      count: 8
                      limit: 10
                      has_prev: false
                      before: null
                      has_next: false
                      after: 01HPMFF5V2CFCF5882QX9FQXYB
                    results:
                      - list:
                          list_description: >-
                            List of users to send newsletter to (Qualified leads
                            + Product Users)
                          list_id: product_update
                          list_name: ''
                          list_type: static_list
                          source: csv_upload
                          subscribers_count: 2
                          updated_at: '2024-09-26T10:20:33.636698+00:00'
                        created_at: '2024-08-04T13:16:12.825+00:00'
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: Metadata related to pagination.
                    properties:
                      count:
                        type: integer
                        description: Total number of records returned.
                        example: 8
                      limit:
                        type: integer
                        description: Maximum number of records per page.
                        example: 10
                      has_prev:
                        type: boolean
                        description: Indicates if there is a previous page.
                        example: false
                      before:
                        type: string
                        nullable: true
                        description: Cursor for the previous page.
                        example: 01HPMFF5V2CFCF5882QX9FQXYB
                      has_next:
                        type: boolean
                        description: Indicates if there is a next page.
                        example: false
                      after:
                        type: string
                        nullable: true
                        description: Cursor for the next page.
                        example: 01HPMFF5V2CFCFti5882QX9FQXYB
                  results:
                    type: array
                    description: List of user lists.
                    items:
                      type: object
                      properties:
                        list:
                          type: object
                          properties:
                            list_id:
                              type: string
                              description: Unique identifier for the list.
                              example: product_update
                            list_name:
                              type: string
                              description: Name of the list.
                              example: Newsletter subscriber users
                            description:
                              type: string
                              description: Brief description of the list.
                              example: List of users to send newsletter to
                            list_type:
                              type: string
                              description: Type of list (static_list, query_based)
                              example: static_list
                            source:
                              type: string
                              nullable: true
                              description: >-
                                Source from which the list was created
                                (csv_upload, database_sync, mixpanel)
                              example: csv_upload
                            subscribers_count:
                              type: integer
                              description: Number of subscribers in the list.
                              example: 2
                            updated_at:
                              type: string
                              format: date-time
                              description: Timestamp when the list was last updated.
                              example: '2024-09-26T10:20:33.636698+00:00'
                        created_at:
                          type: string
                          format: date-time
                          description: Timestamp when the user was added to the list.
                          example: '2024-09-26T10:20:33.636698+00:00'
        '404':
          description: 404 - Not Found
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 404
                    message: 'user [distinct_id: ''user1''] not found'
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP error status code.
                    example: 404
                  message:
                    type: string
                    description: Error message describing the issue.
                    example: 'user [distinct_id: ''user1''] not found'
      deprecated: false
      security:
        - BearerAuth: []
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.

````

Built with [Mintlify](https://mintlify.com).