 
         callback new KodingError "CNAME settings are wrong.", "CNAMEMISMATCH"
 
-
-    callback null, slug
+  createDomain = (domainData, account, callback)->
+
+    model = new JDomain domainData
+    model.save (err)->
+      return callback err  if err
+
+      rel = new Relationship
+        targetId   : model.getId()
+        targetName : 'JDomain'
+        sourceId   : account.getId()
+        sourceName : 'JAccount'
+        as         : 'owner'
+
+      rel.save (err)->
+        return callback err  if err
+
+      callback err, model
 
   @createDomain: secure (client, options, callback)->
 

      hostnameAlias : 'sparse'

    schema          :
      domain        :
        type        : String
        required    : yes

        fetchDomains:
          (signature Function)
        createDomain: [
          (signature Object, Function)
        ]
        # getTldList:
