A treaty is defined as "any international agreement in written form concluded between two or more States or other subjects of international law and governed by international law."
For more information on treaties and their purposes, please see James Crawford, Brownlee's Principles of Public International Law 369-371 (8th ed. 2012).