some cities require permit if the cost is over a certain $ figure, others require a permit for any construction. also there may be code as to the type of fence construction you are allowed to use.
some require good neighbor fence, some allow wire fence with lathe between the weaves, etc. so... bottom line is to check your local plans and permits department.