Angular5 POST request to Phoenix Frramework (api), send 422 (Unprocessable Entity)

yes, look at:

iex(3)> %{"enrollment" => enrollment_params} = %{"address" => "s", "city" => "s", "firstName" => "f", "lastName" => "s", "postalCode" => "s", "state" => "s"}
** (MatchError) no match of right hand side value:

so the clause in your create function doesn’t pattern match your params..

most likely you’ll want

def create(conn, enrollment_params) do