Subscriptions

The Stream Subscriptions endpoint retrieves user subscriptions on streams.

Parameters

The items parameter allows you to filter items based on the name or ID of the item. If the item parameter is not provided the endpoint will return the latest 50 items.

Key

Value

app

String (ID or name of app)

streams

Array of Strings (Name or ID of stream)

groups

Array String (Name of group)

users

Array String (Name or email)

Examples

Get Subscription For The Latest Streams

The example below retrieves subscriptions for the latest streams.

curl -X POST \
  v1/logs/stream-subscriptions \
  -H 'Authorization: Basic <Your Base64 Encoded Token>'

Get Subscriptions For A Single Stream

The example below retrieves subscriptions for a single stream.

curl -X POST \
  v1/logs/stream-subscriptions \
  -H 'Authorization: Basic <Your Base64 Encoded Token>'\
  -d '{
    "items" : ["Reply All"]
  }'

Success Response

A successful response will return an array of items with each item containing a stream and corresponding subscriptions data.

{
    "status": "success",
    "data": [
        {
            "stream": {
                "name": "In a Nutshell",
                "type": "youtube",
                "ID": "EV26-ZTMD-21CV"
            },
            "subscriptions": [
                {
                    "firstname": "Example",
                    "lastname": "One",
                    "email": "example.one@acme.com",
                    "telephone": "+44223334444",
                    "country": "********",
                    "city": "********",
                    "groups" : [],
                    "status": {
                        "subscribed": true,
                        "timestamp": "2022-02-25T15:38:20+02:00"
                    }
                },
                {
                    "firstname": "Example",
                    "lastname": "Two",
                    "email": "example.two@acme.com",
                    "telephone": "",
                    "country": "United Kingdom",
                    "city": "London",
                    "groups" : ["Group A","Group B"]
                    "status": {
                        "subscribed": true,
                        "timestamp": "2021-03-11T12:19:57+02:00"
                    }
                },
                ...etc
            ]
        },
        ...etc
    ],
    "hash": "b52a99654f1666dd1fc0988743a2dfee",
    "response_time": 0.20177698135375977
}

Last updated