diff --git a/mandrill.cabal b/mandrill.cabal
--- a/mandrill.cabal
+++ b/mandrill.cabal
@@ -1,5 +1,5 @@
 name:                mandrill
-version:             0.5.1.0
+version:             0.5.2.0
 synopsis:            Library for interfacing with the Mandrill JSON API
 description:         Pure Haskell client for the Mandrill JSON API
 license:             MIT
@@ -25,6 +25,7 @@
     Network.API.Mandrill.Users.Types
     Network.API.Mandrill.Messages
     Network.API.Mandrill.Messages.Types
+    Network.API.Mandrill.Inbound
   other-modules:
     Network.API.Mandrill.Utils
     Network.API.Mandrill.HTTP
diff --git a/src/Network/API/Mandrill.hs b/src/Network/API/Mandrill.hs
--- a/src/Network/API/Mandrill.hs
+++ b/src/Network/API/Mandrill.hs
@@ -20,19 +20,19 @@
   -- $exampleusage
   ) where
 
-import Control.Monad.Reader
-import Control.Lens
-import Data.Time
-import Text.Blaze.Html
-import Network.API.Mandrill.Types as M
-import Network.API.Mandrill.Messages as M
-import Network.API.Mandrill.Messages.Types as M
-import Network.API.Mandrill.Trans as M
-import Data.Monoid
-import Text.Email.Validate
-import qualified Data.Text as T
-import qualified Data.Aeson as JSON
-import qualified Data.HashMap.Strict as H
+import           Control.Lens
+import           Control.Monad.Reader
+import qualified Data.Aeson                          as JSON
+import qualified Data.HashMap.Strict                 as H
+import           Data.Monoid
+import qualified Data.Text                           as T
+import           Data.Time
+import           Network.API.Mandrill.Messages       as M
+import           Network.API.Mandrill.Messages.Types as M
+import           Network.API.Mandrill.Trans          as M
+import           Network.API.Mandrill.Types          as M
+import           Text.Blaze.Html
+import           Text.Email.Validate
 
 {- $exampleusage
 
@@ -144,7 +144,7 @@
 -- 'MandrillMessage' and this function will send an email inside a
 -- 'MandrillT' transformer. You are not forced to use the 'MandrillT' context
 -- though. Have a look at "Network.API.Mandrill.Messages" for an IO-based,
--- low lever function for sending email.
+-- low level function for sending email.
 sendEmail :: MonadIO m
           => MandrillMessage
           -> MandrillT m (MandrillResponse [MessagesResponse])
diff --git a/src/Network/API/Mandrill/HTTP.hs b/src/Network/API/Mandrill/HTTP.hs
--- a/src/Network/API/Mandrill/HTTP.hs
+++ b/src/Network/API/Mandrill/HTTP.hs
@@ -1,15 +1,15 @@
 {-# LANGUAGE OverloadedStrings #-}
 module Network.API.Mandrill.HTTP where
 
-import Network.API.Mandrill.Settings
-import Network.API.Mandrill.Types
-import qualified Data.Text as T
-import Data.Monoid
-import Data.Aeson
-import Control.Applicative
-import Network.HTTP.Types
-import Network.HTTP.Client
-import Network.HTTP.Client.TLS
+import           Control.Applicative
+import           Data.Aeson
+import           Data.Monoid
+import qualified Data.Text                     as T
+import           Network.API.Mandrill.Settings
+import           Network.API.Mandrill.Types
+import           Network.HTTP.Client
+import           Network.HTTP.Client.TLS
+import           Network.HTTP.Types
 
 toMandrillResponse :: (MandrillEndpoint ep, FromJSON a, ToJSON rq)
                    => ep
diff --git a/src/Network/API/Mandrill/Inbound.hs b/src/Network/API/Mandrill/Inbound.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/API/Mandrill/Inbound.hs
@@ -0,0 +1,78 @@
+{-# LANGUAGE TemplateHaskell #-}
+module Network.API.Mandrill.Inbound where
+import           Control.Lens
+import           Data.Aeson                    (FromJSON, ToJSON, parseJSON,
+                                                toJSON)
+import           Data.Aeson.TH                 (defaultOptions, deriveJSON)
+import           Data.Aeson.Types              (fieldLabelModifier)
+import           Data.Text                     (Text)
+import           Network.API.Mandrill.HTTP     (toMandrillResponse)
+import           Network.API.Mandrill.Settings
+import           Network.API.Mandrill.Types
+import           Network.HTTP.Client           (Manager)
+
+data DomainAddRq =
+  DomainAddRq
+  { _darq_key    :: MandrillKey
+  , _darq_domain :: Text
+  } deriving Show
+
+makeLenses ''DomainAddRq
+deriveJSON defaultOptions { fieldLabelModifier = drop 6 } ''DomainAddRq
+
+data DomainAddResponse =
+  DomainAddResponse
+  { _dares_domain     :: Text
+  , _dares_created_at :: MandrillDate
+  , _dares_valid_mx   :: Bool
+  } deriving Show
+
+
+
+makeLenses ''DomainAddResponse
+deriveJSON defaultOptions { fieldLabelModifier = drop 7 } ''DomainAddResponse
+
+data RouteAddResponse =
+  RouteAddResponse
+  { _rares_id      :: Text
+  , _rares_pattern :: Text
+  , _rares_url     :: Text
+  } deriving Show
+
+
+
+makeLenses ''RouteAddResponse
+deriveJSON defaultOptions { fieldLabelModifier = drop 7 } ''RouteAddResponse
+
+data RouteAddRq =
+  RouteAddRq
+  { _rarq_key     :: Text
+  , _rarq_domain  :: Text
+  , _rarq_pattern :: Text
+  , _rarq_url     :: Text
+  } deriving Show
+
+makeLenses ''RouteAddRq
+deriveJSON defaultOptions { fieldLabelModifier = drop 6 } ''RouteAddRq
+
+addDomain :: MandrillKey
+     -- ^ The API key
+     -> Text
+     -- ^ The domain to add
+     -> Maybe Manager
+     -> IO (MandrillResponse DomainAddResponse)
+addDomain k dom = toMandrillResponse DomainsAdd (DomainAddRq k dom)
+
+
+
+addRoute :: MandrillKey
+     -- ^ The API key
+     -> Text
+     -- ^ The domain to add
+     -> Text
+     -- ^ the pattern including wildcards
+     -> Text
+     -- ^ URL to forward to
+     -> Maybe Manager
+     -> IO (MandrillResponse RouteAddResponse)
+addRoute k dom pattern forward = toMandrillResponse RoutesAdd (RouteAddRq k dom pattern forward)
diff --git a/src/Network/API/Mandrill/Messages.hs b/src/Network/API/Mandrill/Messages.hs
--- a/src/Network/API/Mandrill/Messages.hs
+++ b/src/Network/API/Mandrill/Messages.hs
@@ -1,13 +1,13 @@
 
 module Network.API.Mandrill.Messages where
 
-import           Network.API.Mandrill.Types
+import qualified Data.Text                           as T
+import           Data.Time
+import           Network.API.Mandrill.HTTP
 import           Network.API.Mandrill.Messages.Types
 import           Network.API.Mandrill.Settings
-import           Network.API.Mandrill.HTTP
+import           Network.API.Mandrill.Types
 import           Network.HTTP.Client
-import           Data.Time
-import qualified Data.Text as T
 
 --------------------------------------------------------------------------------
 -- | Send a new transactional message through Mandrill
diff --git a/src/Network/API/Mandrill/Settings.hs b/src/Network/API/Mandrill/Settings.hs
--- a/src/Network/API/Mandrill/Settings.hs
+++ b/src/Network/API/Mandrill/Settings.hs
@@ -15,16 +15,23 @@
   -- Messages API
   | MessagesSend
   | MessagesSendTemplate
-  | MessagesSearch deriving Show
+  | MessagesSearch
+  -- Inbound API
+  | RoutesAdd
+  | DomainsAdd
 
+  deriving Show
+
 class MandrillEndpoint ep where
   toUrl :: ep -> T.Text
 
 instance MandrillEndpoint MandrillCalls where
-  toUrl UsersInfo = "users/info.json"
-  toUrl UsersPing = "users/ping.json"
-  toUrl UsersPing2 = "users/ping2.json"
-  toUrl UsersSenders = "users/senders.json"
-  toUrl MessagesSend = "messages/send.json"
+  toUrl UsersInfo            = "users/info.json"
+  toUrl UsersPing            = "users/ping.json"
+  toUrl UsersPing2           = "users/ping2.json"
+  toUrl UsersSenders         = "users/senders.json"
+  toUrl MessagesSend         = "messages/send.json"
   toUrl MessagesSendTemplate = "messages/send-template.json"
-  toUrl MessagesSearch = "messages/search.json"
+  toUrl MessagesSearch       = "messages/search.json"
+  toUrl DomainsAdd           = "inbound/add-domain.json"
+  toUrl RoutesAdd            = "inbound/add-route.json"
diff --git a/src/Network/API/Mandrill/Types.hs b/src/Network/API/Mandrill/Types.hs
--- a/src/Network/API/Mandrill/Types.hs
+++ b/src/Network/API/Mandrill/Types.hs
@@ -1,34 +1,34 @@
-{-# LANGUAGE TemplateHaskell #-}
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE CPP                 #-}
+{-# LANGUAGE OverloadedStrings   #-}
+{-# LANGUAGE RankNTypes          #-}
 {-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TemplateHaskell     #-}
 module Network.API.Mandrill.Types where
 
-import           Network.API.Mandrill.Utils
-import           Test.QuickCheck
-import           Text.Email.Validate
+import           Control.Applicative
 import           Data.Char
 import           Data.Maybe
 import           Data.Time
-import           Control.Applicative
+import           Network.API.Mandrill.Utils
+import           Test.QuickCheck
+import           Text.Email.Validate
 #if MIN_VERSION_time(1,5,0)
-import Data.Time.Format (TimeLocale, defaultTimeLocale)
+import           Data.Time.Format              (TimeLocale, defaultTimeLocale)
 #else
-import System.Locale (TimeLocale, defaultTimeLocale)
+import           System.Locale                 (TimeLocale, defaultTimeLocale)
 #endif
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Base64 as Base64
-import qualified Data.HashMap.Strict as H
-import qualified Data.Text as T
-import qualified Data.Text.Encoding as TL
-import qualified Data.Text.Lazy as TL
 import           Control.Lens
-import           Data.Monoid
 import           Data.Aeson
-import           Data.Aeson.Types
 import           Data.Aeson.TH
-import qualified Text.Blaze.Html as Blaze
+import           Data.Aeson.Types
+import qualified Data.ByteString               as B
+import qualified Data.ByteString.Base64        as Base64
+import qualified Data.HashMap.Strict           as H
+import           Data.Monoid
+import qualified Data.Text                     as T
+import qualified Data.Text.Encoding            as TL
+import qualified Data.Text.Lazy                as TL
+import qualified Text.Blaze.Html               as Blaze
 import qualified Text.Blaze.Html.Renderer.Text as Blaze
 
 
@@ -41,9 +41,9 @@
 
 --------------------------------------------------------------------------------
 data MandrillError = MandrillError {
-    _merr_status :: !T.Text
-  , _merr_code :: !Int
-  , _merr_name :: !T.Text
+    _merr_status  :: !T.Text
+  , _merr_code    :: !Int
+  , _merr_name    :: !T.Text
   , _merr_message :: !T.Text
   } deriving Show
 
@@ -70,6 +70,7 @@
                           | RR_InvalidSender
                           | RR_Invalid
                           | RR_TestModeLimit
+                          | RR_Unsigned
                           | RR_Rule deriving Show
 
 deriveJSON defaultOptions {
@@ -118,9 +119,9 @@
 data MandrillRecipient = MandrillRecipient {
     _mrec_email :: MandrillEmail
     -- ^ The email address of the recipient
-  , _mrec_name :: Maybe T.Text
+  , _mrec_name  :: Maybe T.Text
     -- ^ The optional display name to use for the recipient
-  , _mrec_type :: Maybe MandrillRecipientTag
+  , _mrec_type  :: Maybe MandrillRecipientTag
     -- ^ The header type to use for the recipient.
     --   defaults to "to" if not provided
   } deriving Show
@@ -195,7 +196,7 @@
 
 --------------------------------------------------------------------------------
 data MandrillMetadata = MandrillMetadata {
-    _mmdt_rcpt :: !T.Text
+    _mmdt_rcpt   :: !T.Text
   , _mmdt_values :: Object
   } deriving Show
 
@@ -220,8 +221,8 @@
 
 --------------------------------------------------------------------------------
 data MandrillWebContent = MandrillWebContent {
-    _mwct_type :: !T.Text
-  , _mwct_name :: !T.Text
+    _mwct_type    :: !T.Text
+  , _mwct_name    :: !T.Text
     -- ^ [for images] the Content ID of the image
     -- - use <img src="cid:THIS_VALUE"> to reference the image
     -- in your HTML content
@@ -234,67 +235,67 @@
 --------------------------------------------------------------------------------
 -- | The information on the message to send
 data MandrillMessage = MandrillMessage {
-   _mmsg_html :: MandrillHtml
+   _mmsg_html                      :: MandrillHtml
    -- ^ The full HTML content to be sent
- , _mmsg_text :: Maybe T.Text
+ , _mmsg_text                      :: Maybe T.Text
    -- ^ Optional full text content to be sent
- , _mmsg_subject :: !T.Text
+ , _mmsg_subject                   :: !T.Text
    -- ^ The message subject
- , _mmsg_from_email :: MandrillEmail
+ , _mmsg_from_email                :: MandrillEmail
    -- ^ The sender email address
- , _mmsg_from_name :: Maybe T.Text
+ , _mmsg_from_name                 :: Maybe T.Text
    -- ^ Optional from name to be used
- , _mmsg_to :: [MandrillRecipient]
+ , _mmsg_to                        :: [MandrillRecipient]
    -- ^ A list of recipient information
- , _mmsg_headers :: MandrillHeaders
+ , _mmsg_headers                   :: MandrillHeaders
    -- ^ optional extra headers to add to the message (most headers are allowed)
- , _mmsg_important :: Maybe Bool
+ , _mmsg_important                 :: Maybe Bool
    -- ^ whether or not this message is important, and should be delivered ahead
    -- of non-important messages
- , _mmsg_track_opens :: Maybe Bool
+ , _mmsg_track_opens               :: Maybe Bool
    -- ^ whether or not to turn on open tracking for the message
- , _mmsg_track_clicks :: Maybe Bool
+ , _mmsg_track_clicks              :: Maybe Bool
    -- ^ whether or not to turn on click tracking for the message
- , _mmsg_auto_text :: Maybe Bool
+ , _mmsg_auto_text                 :: Maybe Bool
    -- ^ whether or not to automatically generate a text part for messages that are not given text
- , _mmsg_auto_html :: Maybe Bool
+ , _mmsg_auto_html                 :: Maybe Bool
    -- ^ whether or not to automatically generate an HTML part for messages that are not given HTML
- , _mmsg_inline_css :: Maybe Bool
+ , _mmsg_inline_css                :: Maybe Bool
    -- ^ whether or not to automatically inline all CSS styles provided in the message HTML
    -- - only for HTML documents less than 256KB in size
- , _mmsg_url_strip_qs :: Maybe Bool
+ , _mmsg_url_strip_qs              :: Maybe Bool
    -- ^ whether or not to strip the query string from URLs when aggregating tracked URL data
- , _mmsg_preserve_recipients :: Maybe Bool
+ , _mmsg_preserve_recipients       :: Maybe Bool
    -- ^ whether or not to expose all recipients in to "To" header for each email
- , _mmsg_view_content_link :: Maybe Bool
+ , _mmsg_view_content_link         :: Maybe Bool
    -- ^ set to false to remove content logging for sensitive emails
- , _mmsg_bcc_address :: Maybe T.Text
+ , _mmsg_bcc_address               :: Maybe T.Text
    -- ^ an optional address to receive an exact copy of each recipient's email
- , _mmsg_tracking_domain :: Maybe T.Text
+ , _mmsg_tracking_domain           :: Maybe T.Text
    -- ^ a custom domain to use for tracking opens and clicks instead of mandrillapp.com
- , _mmsg_signing_domain :: Maybe Bool
+ , _mmsg_signing_domain            :: Maybe Bool
    -- ^ a custom domain to use for SPF/DKIM signing instead of mandrill
    -- (for "via" or "on behalf of" in email clients)
- , _mmsg_return_path_domain :: Maybe Bool
+ , _mmsg_return_path_domain        :: Maybe Bool
    -- ^ a custom domain to use for the messages's return-path
- , _mmsg_merge :: Maybe Bool
+ , _mmsg_merge                     :: Maybe Bool
    -- ^ whether to evaluate merge tags in the message.
    -- Will automatically be set to true if either merge_vars
    -- or global_merge_vars are provided.
- , _mmsg_global_merge_vars :: [MergeVar]
+ , _mmsg_global_merge_vars         :: [MergeVar]
    -- ^ global merge variables to use for all recipients. You can override these per recipient.
- , _mmsg_merge_vars :: [MandrillMergeVars]
+ , _mmsg_merge_vars                :: [MandrillMergeVars]
    -- ^ per-recipient merge variables, which override global merge variables with the same name.
- , _mmsg_tags :: [MandrillTags]
+ , _mmsg_tags                      :: [MandrillTags]
    -- ^ an array of string to tag the message with. Stats are accumulated using tags,
    -- though we only store the first 100 we see, so this should not be unique
    -- or change frequently. Tags should be 50 characters or less.
    -- Any tags starting with an underscore are reserved for internal use
    -- and will cause errors.
- , _mmsg_subaccount :: Maybe T.Text
+ , _mmsg_subaccount                :: Maybe T.Text
    -- ^ the unique id of a subaccount for this message
    -- - must already exist or will fail with an error
- , _mmsg_google_analytics_domains :: [T.Text]
+ , _mmsg_google_analytics_domains  :: [T.Text]
    -- ^ an array of strings indicating for which any matching URLs
    -- will automatically have Google Analytics parameters appended
    -- to their query string automatically.
@@ -302,17 +303,17 @@
    -- ^ optional string indicating the value to set for the utm_campaign
    -- tracking parameter. If this isn't provided the email's from address
    -- will be used instead.
- , _mmsg_metadata :: Object
+ , _mmsg_metadata                  :: Object
    -- ^ metadata an associative array of user metadata. Mandrill will store
    -- this metadata and make it available for retrieval.
    -- In addition, you can select up to 10 metadata fields to index
    -- and make searchable using the Mandrill search api.
- , _mmsg_recipient_metadata :: [MandrillMetadata]
+ , _mmsg_recipient_metadata        :: [MandrillMetadata]
    -- ^ Per-recipient metadata that will override the global values
    -- specified in the metadata parameter.
- , _mmsg_attachments :: [MandrillWebContent]
+ , _mmsg_attachments               :: [MandrillWebContent]
    -- ^ an array of supported attachments to add to the message
- , _mmsg_images :: [MandrillWebContent]
+ , _mmsg_images                    :: [MandrillWebContent]
    -- ^ an array of embedded images to add to the message
  } deriving Show
 
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -1,14 +1,14 @@
 {-# LANGUAGE OverloadedStrings #-}
 module Main where
 
-import           System.Environment
 import           Data.Monoid
-import           Tests
+import qualified Data.Text             as T
 import           Online
+import           System.Environment
 import           Test.Tasty
 import           Test.Tasty.HUnit
 import           Test.Tasty.QuickCheck
-import qualified Data.Text as T
+import           Tests
 
 ----------------------------------------------------------------------
 withQuickCheckDepth :: TestName -> Int -> [TestTree] -> TestTree
@@ -23,10 +23,12 @@
     Nothing -> return []
     Just k  -> return [
                  testGroup "Mandrill online tests" [
-                   testCase "users/info.json" (testOnlineUsersInfo k)
-                 , testCase "users/ping2.json" (testOnlineUsersPing2 k)
-                 , testCase "users/senders.json" (testOnlineUsersSenders k)
-                 , testCase "messages/send.json" (testOnlineMessagesSend k)
+                   testCase "users/info.json"        (testOnlineUsersInfo k)
+                 , testCase "users/ping2.json"       (testOnlineUsersPing2 k)
+                 , testCase "users/senders.json"     (testOnlineUsersSenders k)
+                 , testCase "messages/send.json"     (testOnlineMessagesSend k)
+                 , testCase "inbound/addDomain.json" (testOnlineDomainAdd k)
+                 , testCase "inbound/addRoute.json"  (testOnlineRouteAdd k)
                  ]]
 
 ----------------------------------------------------------------------
@@ -39,5 +41,8 @@
            testCase "users/info.json API parsing"    testUsersInfo
          , testCase "users/senders.json API parsing" testUsersSenders
          , testCase "messages/send.json API parsing" testMessagesSend
+         , testCase "messages/send.json API response parsing" testMessagesResponseRejected
+         , testCase "inbound/add-route.json API response parsing" testRouteAdd
+         , testCase "inbound/add-domain.json API response parsing" testDomainAdd
          ]
      ]
diff --git a/test/Online.hs b/test/Online.hs
--- a/test/Online.hs
+++ b/test/Online.hs
@@ -1,19 +1,20 @@
 {-# LANGUAGE OverloadedStrings #-}
 module Online where
 
-import           Test.QuickCheck
-import           Test.Tasty.HUnit
-import           Text.RawString.QQ
-import           Data.Either
 import           Data.Aeson
+import qualified Data.ByteString.Char8               as C8
+import           Data.Either
 import           Network.API.Mandrill.Messages.Types
 import           Network.API.Mandrill.Users.Types
-import qualified Data.ByteString.Char8 as C8
 import           RawData
+import           Test.QuickCheck
+import           Test.Tasty.HUnit
+import           Text.RawString.QQ
 
+import qualified Network.API.Mandrill.Inbound        as API
+import qualified Network.API.Mandrill.Messages       as API
 import           Network.API.Mandrill.Types
-import qualified Network.API.Mandrill.Messages as API
-import qualified Network.API.Mandrill.Users as API
+import qualified Network.API.Mandrill.Users          as API
 
 --
 -- Users calls
@@ -50,3 +51,20 @@
   case res of
     MandrillSuccess _ -> return ()
     MandrillFailure e -> fail $ "messages/send.json " ++ show e
+
+--
+-- Inbound calls
+--
+testOnlineDomainAdd :: MandrillKey -> Assertion
+testOnlineDomainAdd k = do
+  res <- API.addDomain k "foobar.com" Nothing
+  case res of
+   MandrillSuccess a -> print a
+   MandrillFailure e -> fail $ "inbound/add-domain.json " ++ show e
+
+testOnlineRouteAdd :: MandrillKey -> Assertion
+testOnlineRouteAdd k = do
+  res <- API.addRoute k "foobar.com" "mail-*" "http://requestb.in/19a4frw1"  Nothing
+  case res of
+   MandrillSuccess a -> print a
+   MandrillFailure e -> fail $ "inbound/add-domain.json " ++ show e
diff --git a/test/RawData.hs b/test/RawData.hs
--- a/test/RawData.hs
+++ b/test/RawData.hs
@@ -1,10 +1,10 @@
 {-# LANGUAGE QuasiQuotes #-}
 module RawData where
 
-import Test.QuickCheck
-import Test.Tasty.HUnit
-import Text.RawString.QQ
-import Data.Either
+import           Data.Either
+import           Test.QuickCheck
+import           Test.Tasty.HUnit
+import           Text.RawString.QQ
 
 usersInfoData :: String
 usersInfoData = [r|
@@ -198,5 +198,33 @@
     "async": false,
     "ip_pool": "Main Pool",
     "send_at": "2014-08-17T14:23:02.954Z"
+}
+|]
+
+
+messagesResponseRejected = [r|
+[ { "email"        : "foo@bar.com",
+    "status"       : "rejected",
+    "_id"          : "abc123",
+    "reject_reason": "unsigned"
+  }
+]
+|]
+
+
+domainAdd = [r|
+{
+    "domain": "inbound.example.com",
+    "created_at": "2013-01-01 15:30:27",
+    "valid_mx": true
+}
+|]
+
+
+routeAdd= [r|
+{
+    "id": "7.23",
+    "pattern": "mailbox-*",
+    "url": "http://example.com/webhook-url"
 }
 |]
diff --git a/test/Tests.hs b/test/Tests.hs
--- a/test/Tests.hs
+++ b/test/Tests.hs
@@ -1,13 +1,15 @@
 {-# LANGUAGE CPP #-}
 module Tests where
 
-import Test.Tasty.HUnit
-import Data.Either
-import Data.Aeson
-import Network.API.Mandrill.Messages.Types
-import Network.API.Mandrill.Users.Types
-import qualified Data.ByteString.Char8 as C8
-import RawData
+import           Data.Aeson
+import qualified Data.ByteString.Char8               as C8
+import           Data.Either
+import           Network.API.Mandrill.Inbound
+import           Network.API.Mandrill.Messages.Types
+import           Network.API.Mandrill.Types
+import           Network.API.Mandrill.Users.Types
+import           RawData
+import           Test.Tasty.HUnit
 
 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 706
 isRight :: Either a b -> Bool
@@ -16,7 +18,7 @@
 #endif
 
 testMessagesSend :: Assertion
-testMessagesSend = 
+testMessagesSend =
   assertBool ("send.json: Parsing failed! " ++ show parsePayload)
              (isRight parsePayload)
   where
@@ -40,3 +42,28 @@
   where
     parsePayload :: Either String UsersSendersResponse
     parsePayload = eitherDecodeStrict . C8.pack $ usersSendersData
+
+testMessagesResponseRejected :: Assertion
+testMessagesResponseRejected = do
+  assertBool ("send.json response: Parsing failed" ++ show parsePayload)
+             (isRight parsePayload)
+  where
+    parsePayload :: Either String (MandrillResponse [MessagesResponse])
+    parsePayload = eitherDecodeStrict . C8.pack $ messagesResponseRejected
+
+testDomainAdd :: Assertion
+testDomainAdd =
+  assertBool ("inbound/add-domain.json (response): parsing failed" ++ show parsePayload)
+             (isRight parsePayload)
+  where
+    parsePayload :: Either String DomainAddResponse
+    parsePayload = eitherDecodeStrict . C8.pack $ domainAdd
+
+
+testRouteAdd :: Assertion
+testRouteAdd =
+  assertBool ("inbound/add-route.json (response): parsing failed" ++ show parsePayload)
+             (isRight parsePayload)
+  where
+    parsePayload :: Either String RouteAddResponse
+    parsePayload = eitherDecodeStrict . C8.pack $ routeAdd
