diff --git a/cachix-api.cabal b/cachix-api.cabal
--- a/cachix-api.cabal
+++ b/cachix-api.cabal
@@ -1,12 +1,12 @@
 cabal-version:      2.2
 name:               cachix-api
-version: 0.7.0
+version:            1.0.0
 synopsis:           Servant HTTP API specification for https://cachix.org
 homepage:           https://github.com/cachix/cachix#readme
 bug-reports:        https://github.com/cachix/cachix/issues
-author:             Domen Kožar
-maintainer:         domen@enlambda.com
-copyright:          2018 Domen Kožar
+author:             Domen Kozar
+maintainer:         domen@cachix.org
+copyright:          2018 Domen Kozar
 category:           Nix
 license:            Apache-2.0
 license-file:       LICENSE
@@ -20,6 +20,7 @@
     NoImplicitPrelude
     DeriveAnyClass
     DeriveGeneric
+    DerivingVia
     OverloadedStrings
 
   ghc-options:
@@ -68,6 +69,7 @@
     , cookie
     , cryptonite
     , deepseq
+    , deriving-aeson
     , exceptions
     , http-api-data
     , http-media
@@ -94,7 +96,10 @@
   import:             defaults
   type:               exitcode-stdio-1.0
   main-is:            Main.hs
-  other-modules:      Spec
+  other-modules:
+    DeploySpec
+    Spec
+
   hs-source-dirs:     test
   build-depends:
     , aeson
@@ -120,5 +125,6 @@
     , swagger2
     , text
     , transformers
+    , unordered-containers
 
   build-tool-depends: hspec-discover:hspec-discover -any
diff --git a/src/Cachix/API/Deploy.hs b/src/Cachix/API/Deploy.hs
--- a/src/Cachix/API/Deploy.hs
+++ b/src/Cachix/API/Deploy.hs
@@ -5,11 +5,8 @@
 module Cachix.API.Deploy where
 
 import Cachix.API (CachixAuth)
-import qualified Cachix.Types.ByteStringStreaming as ByteStringStreaming
 import qualified Cachix.Types.Deploy as Deploy
 import qualified Cachix.Types.DeployResponse as DeployResponse
-import Conduit (ConduitT, ResourceT)
-import qualified Data.UUID as UUID
 import Protolude
 import Servant.API
 import Servant.API.Generic
diff --git a/src/Cachix/API/WebSocketSubprotocol.hs b/src/Cachix/API/WebSocketSubprotocol.hs
--- a/src/Cachix/API/WebSocketSubprotocol.hs
+++ b/src/Cachix/API/WebSocketSubprotocol.hs
@@ -35,7 +35,8 @@
 data DeploymentDetails = DeploymentDetails
   { storePath :: Text,
     id :: UUID,
-    index :: Int64
+    index :: Int64,
+    rollbackScript :: Maybe Text
   }
   deriving (Show, Eq, Generic, Aeson.FromJSON, Aeson.ToJSON)
 
@@ -45,7 +46,7 @@
   deriving (Show, Eq, Generic, Aeson.FromJSON, Aeson.ToJSON)
 
 data AgentCommand
-  = DeploymentStarted {id :: UUID, time :: UTCTime}
+  = DeploymentStarted {id :: UUID, time :: UTCTime, closureSize :: Maybe Int64}
   | DeploymentFinished {id :: UUID, time :: UTCTime, hasSucceeded :: Bool}
   deriving (Show, Eq, Generic, Aeson.FromJSON, Aeson.ToJSON)
 
diff --git a/src/Cachix/Types/Deploy.hs b/src/Cachix/Types/Deploy.hs
--- a/src/Cachix/Types/Deploy.hs
+++ b/src/Cachix/Types/Deploy.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DataKinds #-}
 {-# LANGUAGE DeriveAnyClass #-}
 
 module Cachix.Types.Deploy where
@@ -8,9 +9,12 @@
   )
 import Data.HashMap.Strict
 import Data.Swagger (ToSchema)
+import Deriving.Aeson
 import Protolude
 
-newtype Deploy = Deploy
-  { agents :: HashMap Text Text
+data Deploy = Deploy
+  { agents :: HashMap Text Text,
+    rollbackScript :: Maybe (HashMap Text Text)
   }
-  deriving (Show, Generic, FromJSON, ToJSON, ToSchema)
+  deriving (Show, Eq, Generic, FromJSON, ToSchema)
+  deriving (ToJSON) via CustomJSON '[OmitNothingFields] Deploy
diff --git a/test/DeploySpec.hs b/test/DeploySpec.hs
new file mode 100644
--- /dev/null
+++ b/test/DeploySpec.hs
@@ -0,0 +1,28 @@
+module DeploySpec where
+
+import Cachix.Types.Deploy
+import Data.Aeson (eitherDecode, encode)
+import qualified Data.ByteString.Lazy as BSL
+import Data.HashMap.Strict
+import Protolude
+import Test.Hspec
+import qualified Prelude
+
+spec :: Spec
+spec =
+  describe "Deploy" $ do
+    it "parses a simple deploy" testSimple
+    it "parses rollbackScript" testRollback
+
+test :: BSL.ByteString -> Expectation
+test input = (encode <$> (eitherDecode input :: Either Prelude.String Deploy)) `shouldBe` Right input
+
+testSimple :: Expectation
+testSimple = do
+  let input = "{\"agents\":{\"myagent\":\"/nix/store/blabla\"}}"
+  test input
+
+testRollback :: Expectation
+testRollback = do
+  let input = "{\"agents\":{\"myagent\":\"/nix/store/blabla\"},\"rollbackScript\":{\"x86_64-linux\":\"/nix/store/rollback.sh\"}}"
+  test input
