A contract is a legal agreement between two individuals that gives rise to an obligation that is able to be enforced by the courts. A contract, to be valid, requires the meeting of the minds of all parties to the contract; this is known as consensus ad idem.