DocsBuilding AppsInstalling IntercomAPI & Webhook ReferenceCanvas Kit Reference
DocsApp StoreForumBlogYour Apps

List Subscriptions

Example List Subscriptions Request

$ curl https://api.intercom.io/subscriptions \
-H 'Authorization:Bearer <Your access token>' \
-H 'Accept: application/json'
intercom.subscriptions.all.each { ... }
HTTP/1.1 200 Ok

{
  "type": "notification_subscription.list",
  "items": [
      {
        "type": "notification_subscription",
        "id": "nsub_6ab4c480-fd8b-11e3-958f-c779cae3e1b3",
        "created_at": 1392731331,
        "updated_at": 1392731331,
        "service_type": "web",
        "topics": ["user"],
        "url": "https://example.org/hooks/1",
        "active": true,
        "hub_secret": null
      },
      {
        "type": "notification_subscription",
        "id": "nsub_3fb4c480-fd8b-11e3-958f-c779cae3e1cd",
        "created_at": 1392731122,
        "updated_at": 1392731122,
        "service_type": "web",
        "topics": [
          "conversation.user.created",
          "conversation.user.replied"
        ],
        "url": "https://example.org/hooks/2",
        "active": true,
        "hub_secret": null
      }
  ],
  "pages":{}
}
SubscriptionCollection list = Subscription.list();

while (list.hasNext()) {
    Subscription sub = list.next();
    String appID = sub.getAppID();
    String serviceType = sub.getServiceType();
    List<Subscription.Topic> topics = sub.getTopics();
    String hubSecret = sub.getHubSecret();
}

You can fetch the subscriptions for an App by sending a GET request to https://api.intercom.io/subscriptions/.