Get subscription eligibility for a user

The Attentive Graph supports queries to list all subscription types and channels a user is subscribed to, analogous to the GET /subscriptions REST endpoint.

You can use this endpoint to check if a subscriber is eligible to receive SMS or email campaigns. You can query for a subscriber using either their phone number or email. One of the query parameters is required in order to look up subscription eligibilities. You can query for one to many users at a time if you use aliases, as seen in the example. With GraphQl, you can also retrieve additional information about the user along with their subscription eligibilities.

Example query

Copy
Copied
query {
  viewer {
    installedApplication {
      installerCompany {
        phonesubscriber: user(phone: "5555555555") {
          subscriptions {
            subscriptionEligibilities {
              subscription {
                channel
                type
              }
              eligibility {
                isEligible
              }
            }
          }
        }
        emailSubscriber: user(email: "test@gmail.com") {
          subscriptions {
            subscriptionEligibilities {
              subscription {
                channel
                type
              }
              eligibility {
                isEligible
              }
            }
          }
        }
      }
    }
  }
}