There are many dubious explanations for the origin of the term OK. Some date the term, which is essentially an agreement or an assent, back to the Native American term “okeh” which means an agreement. Others say the term came from African American slaves. Some connect it to the Greek olla kalla which means "all good."
Actually, these explanations are specious. We have precise written information regarding the origins of OK. It dates from the 1840 Presidential run of Martin Van Buren, and the OK club, which supported him. OK was an abbreviation of Old Kinderhook. Kinderhook, New York, was where many of the club members were from, thus the word has a double meaning.
OK soon became handy as a simple means for stating agreement. However, it should be noted that the OK club failed to get Martin Van Buren re-elected. The term sprang into public notice because many newspapers that did not support Van Buren began to define OK in negative ways. They used the word to mean Orfully Konfused, or Often Kontradicts, for example. The continued use of the term eventually migrated into not only the American language, but is used around the world as well.
Frequent usage of a word, especially by the media tends to popularize it. Thus we owe OK to the Republican media in the mid 19th century. Abbreviations prior to Van Buren’s election were quite popular, much as they are today. GT was used for "gone to Texas," in much of the print media, and NG meant "no go." It’s hard to know why this word stuck and others did not.
Today, we often use abbreviations in email and text messaging, and some are migrating into common language. For example TTFN, or "ta ta for now," is a frequent signoff, first used in the 1950s Disney film Winnie the Pooh by Tigger. People may simply say TTFN instead of speaking the whole phrase.
In a world where brevity is often important, OK holds up well. Though technically, it should be written as “okay,” OK is often the spelling of choice. It is a useful text term as well as a common speaking term.