There have been numerous attempts to explain the emergence of this expression
which swept into popular use in the US during the mid 19th century.
Most are pure speculation. It doesn't seem at all likely from linguistic and historical evidence
that it finds its origins in any of the following:
the Scots expression 'och aye', the Greek 'ola kala' meaning 'it is good', the Choctaw Indian
'oke' or 'oke' meaning 'it is so', the French 'aux Caye' which means from 'from Cayes', a port in Haiti with
a reputation for good rum, 'au quai' meaning 'to the quay', supposedly used by French-speaking dockers,
or even the initials of a railway freight agent called Obediah Kelly, who is said to have
written them on documents he had checked. A more likely explanation is that the term originated
as an abbreviation 'orl korrekt', a jokey mispelling of 'all correct' which was current in the US in the 1830s.
The oldest known written references to 'okay' result from its use as a slogan by the Democratic Party during
the American presidential election of 1840. Their candidate, President Martin Van Buren was nicknamed
Old Kinderhook, after his birth place in New York State, and his supporters formed the 'OK club'.
This undoubtedly helped popularize the term, although it did not get president Van Buren re-elected.
The only other theory with at least a degree of plausibility, is that the term originated
amongst black slaves of West African origin and represents a word meaning 'alright yes indeed' in various
West African languages. Unfortunately, historical evidence enabling the origin of this expression to
be finally and firmly established, is hard to unearth.