       (ANY "/orgs/:org-slug/boards/:board-slug/entries/:entry-uuid/follow-up/:follow-up-uuid/complete"
         [org-slug board-slug entry-uuid follow-up-uuid]
         (pool/with-pool [conn db-pool]
-          (follow-up conn org-slug board-slug entry-uuid follow-up-uuid))))))+          (follow-up conn org-slug board-slug entry-uuid follow-up-uuid)))
+      (ANY "/orgs/:org-slug/inbox/dismiss-all"
+        [org-slug]
+        (pool/with-pool [conn db-pool]
+          (inbox-dismiss-all conn org-slug)))
+      (ANY "/orgs/:org-slug/boards/:board-slug/entries/:entry-uuid/inbox/dismiss"
+        [org-slug board-slug entry-uuid]
+        (pool/with-pool [conn db-pool]
+          (inbox conn org-slug board-slug entry-uuid :dismiss)))
+      (ANY "/orgs/:org-slug/boards/:board-slug/entries/:entry-uuid/inbox/follow"
+        [org-slug board-slug entry-uuid]
+        (pool/with-pool [conn db-pool]
+          (inbox conn org-slug board-slug entry-uuid :follow)))
+      (ANY "/orgs/:org-slug/boards/:board-slug/entries/:entry-uuid/inbox/unfollow"
+        [org-slug board-slug entry-uuid]
+        (pool/with-pool [conn db-pool]
+          (inbox conn org-slug board-slug entry-uuid :unfollow))))))
     :existing-entries (api-common/rep entries)}
    false))

;; ----- Actions -----

(defn- share-entry [conn ctx entry-for]

      (timbre/info "Updated entry for:" entry-for)
      (notification/send-trigger! (notification/->trigger :update org board {:old entry :new final-entry} user nil))
      {:updated-entry (api-common/rep (assoc final-entry :board-name (:name board)))})

    (do (timbre/error "Failed updating entry:" entry-for) false)))

(defn- update-entry-new [conn ctx entry-for action-type]
  (timbre/info "Updating entry for:" entry-for)
  (if-let* [org (:existing-org ctx)
            board (:existing-board ctx)
            user (:user ctx)
            entry (:existing-entry ctx)
            updated-entry (:updated-entry ctx)
            final-entry (entry-res/update-entry! conn (:uuid updated-entry) updated-entry user)
            dismiss-at (:data ctx)]
    (let [notify-map (cond
                      (= action-type :dismiss)
                      {:dismiss-at dismiss-at}
                      (= action-type :follow)
                      {:follow true}
                      (= action-type :unfollow)
                      {:unfollow true})]
      (timbre/info "Updated entry new for:" entry-for "action:" action-type)
      (notification/send-trigger! (notification/->trigger action-type org board {:old entry :new updated-entry :inbox-action notify-map} user nil))
      {:updated-entry (api-common/rep final-entry)})

    (do (timbre/error "Failed updating entry:" entry-for) false)))

(defn- inbox-dismiss-all [conn ctx entry-for]
  (timbre/info "Dismiss all entries for:" entry-for)
  (if-let* [org (:existing-org ctx)
            user (:user ctx)
            existing-entries (:existing-entries ctx)
            final-entries (map
                            #(entry-res/update-entry! conn (:uuid %) % user)
                            existing-entries)
            dismiss-at (:data ctx)]
    (if (every? #(lib-schema/valid? common-res/Entry %) final-entries)
      (do
        (timbre/info "Dismissed all entries for:" entry-for)
        (doseq [entry final-entries]
          (notification/send-trigger! (notification/->trigger :dismiss org nil {:new entry :inbox-action {:dismiss-at dismiss-at}} user nil)))
        {:updated-entries (api-common/rep final-entries)})
      false)

    (do (timbre/error "Failed updating entry:" entry-for) false)))

