No function clause matching UserController.create Method when POSTing

Your create function is not matching the parameters that you are sending via curl. A possible fix is to change the first line from:

def create(conn, %{"user" => user_params}) do

to:

def create(conn, %{"accounts" => user_params}) do

Although personally i prefer to do little to no matching in controller function heads because I find the no function clause matching not very informative. If you changed your create to function to:

def create(conn, params) do
  %{"user" => user_params} = params
  ...
end

Then you would have gotten a more informative pattern matching error.