diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
 
-50200.7.0
+50200.9.0
+=========
+
+API changes:
+ * Added `Network.Mattermost.Types.Internal.connectionDataURL` and its
+   return type, `ServerBaseURL`, to obtain base URLs corresponding to a
+   connection handle.
+
+50200.8.0
 =========
 
 API changes:
diff --git a/mattermost-api.cabal b/mattermost-api.cabal
--- a/mattermost-api.cabal
+++ b/mattermost-api.cabal
@@ -1,5 +1,5 @@
 name:                mattermost-api
-version:             50200.8.0
+version:             50200.9.0
 synopsis:            Client API for Mattermost chat system
 
 description:         Client API for Mattermost chat system.  Mattermost is a
diff --git a/src/Network/Mattermost/Types.hs b/src/Network/Mattermost/Types.hs
--- a/src/Network/Mattermost/Types.hs
+++ b/src/Network/Mattermost/Types.hs
@@ -9,6 +9,8 @@
     ( module Network.Mattermost.Types
     , module Network.Mattermost.Types.Base
     , ConnectionType(..)
+    , connectionDataURL
+    , ServerBaseURL(..)
     )
     where
 
diff --git a/src/Network/Mattermost/Types/Internal.hs b/src/Network/Mattermost/Types/Internal.hs
--- a/src/Network/Mattermost/Types/Internal.hs
+++ b/src/Network/Mattermost/Types/Internal.hs
@@ -10,6 +10,7 @@
 module Network.Mattermost.Types.Internal where
 
 import Control.Monad (when)
+import Data.Monoid ((<>))
 import Data.Pool (Pool)
 import qualified Network.Connection as C
 import Control.Exception (finally)
@@ -92,3 +93,21 @@
   , cdLogger         :: Maybe Logger
   , cdConnectionType :: ConnectionType
   }
+
+newtype ServerBaseURL = ServerBaseURL T.Text
+                      deriving (Eq, Show)
+
+connectionDataURL :: ConnectionData -> ServerBaseURL
+connectionDataURL cd =
+    let scheme = case cdConnectionType cd of
+            ConnectHTTPS {} -> "https"
+            ConnectHTTP {} -> "http"
+        host = cdHostname cd
+        port = T.pack $
+               if cdConnectionType cd == ConnectHTTP
+               then if cdPort cd == 80 then "" else ":" <> show (cdPort cd)
+               else if cdPort cd == 443 then "" else ":" <> show (cdPort cd)
+        path1 = cdUrlPath cd
+        path2 = if "/" `T.isPrefixOf` path1
+                then path1 else "/" <> path1
+    in ServerBaseURL $ scheme <> "://" <> host <> port <> path2
