# Subscriptions

The Stream Subscriptions endpoint retrieves user subscriptions on streams.

## Parameters <a href="#parameters" id="parameters"></a>

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.

<table><thead><tr><th width="194"></th><th></th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Value</strong></td></tr><tr><td><strong>app</strong></td><td>String (ID or name of app)</td></tr><tr><td><strong>streams</strong></td><td>Array of Strings (Name or ID of stream)</td></tr><tr><td><strong>groups</strong></td><td>Array String (Name of group)</td></tr><tr><td><strong>users</strong></td><td>Array String (Name or email)</td></tr><tr><td></td><td></td></tr></tbody></table>

## 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.&#x20;

```
{
    "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
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://everyday-digital.gitbook.io/falkor-dev-docs/streams/subscriptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
