> ## 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 object subscriptions

> API to fetch all objects that a given user is subscribed to.



## OpenAPI

````yaml GET /v1/user/{distinct_id}/subscribed_to/object/
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/object/:
    get:
      summary: Fetch User object subscriptions
      description: API to fetch all objects that a given user is subscribed to.
      operationId: fetch-user-object-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'
          content:
            application/json:
              examples:
                Result:
                  value:
                    meta:
                      count: 4
                      limit: 1
                      has_prev: false
                      before: null
                      has_next: false
                      after: null
                    results:
                      - properties:
                          role: manager
                        object:
                          id: frontend
                          object_type: department
                          properties: {}
                          subscriptions_count: 10
                          updated_at: '2025-01-28T16:49:23.695448+00:00'
                        created_at: '2025-01-23T16:34:56.093683+00:00'
                        updated_at: '2025-01-23T16:34:56.093683+00:00'
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    description: Metadata related to pagination.
                    properties:
                      count:
                        type: integer
                        description: Total number of results.
                        example: 4
                      limit:
                        type: integer
                        description: The maximum number of results per request.
                        example: 10
                      has_prev:
                        type: boolean
                        example: false
                        description: Indicates if there are previous results.
                      before:
                        type: string
                        nullable: true
                        description: Cursor for fetching previous results.
                        example: 01JXXXX99APxxxxxx8Wxxxx1B
                      has_next:
                        type: boolean
                        description: Indicates if there are more results available.
                        example: false
                      after:
                        type: string
                        nullable: true
                        description: Cursor for fetching next results.
                        example: 02KXXXX99APxxxxxx0Wxxxx1A
                  results:
                    type: array
                    description: List of retrieved results.
                    items:
                      type: object
                      properties:
                        properties:
                          type: object
                          description: >-
                            Object subscription property referred as
                            `$recipient.subscription.<prop>` in templates or
                            workflows.
                        object:
                          type: object
                          description: Details of the subscribed object.
                          properties:
                            id:
                              type: string
                              description: Unique identifier for the object.
                              example: frontend
                            object_type:
                              type: string
                              description: Type of object.
                              example: department
                            properties:
                              type: object
                              description: Additional properties related to the object.
                            subscriptions_count:
                              type: integer
                              description: >-
                                Number of active subscriptions associated with
                                the object.
                              example: 1
                            updated_at:
                              type: string
                              format: date-time
                              description: Timestamp when the object was last updated.
                              example: '2025-01-28T16:49:23.695448+00:00'
                        created_at:
                          type: string
                          format: date-time
                          description: Timestamp when the result was created.
                          example: '2025-01-23T16:34:56.093683+00:00'
                        updated_at:
                          type: string
                          format: date-time
                          description: Timestamp when the result was last updated.
                          example: '2025-01-23T16:34:56.093683+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 status code indicating the error type.
                    example: 404
                  message:
                    type: string
                    description: Error message providing details about 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).