From AP Style...
Home > AP Stylebook > Chapter O > OK, OK’d, OK’ing, OKs
OK, OK’d, OK’ing, OKs Do not use okay.
From Grammar Girl:
The Origin of OK
"OK" was born in America in the 1830s. Much like the text messaging abbreviations of today, "OK" was an abbreviation for a funny misspelling of "all correct": "oll korrekt." According to the Oxford English Dictionary, the "okay" spelling didn’t appear until 1895.
There were other odd abbreviations with similar origins in the same era ("OW" for "oll wright," for example), but Martin Van Buren, whose nickname was Old Kinderhooks because he was born in Kinderhook, NY, adopted the motto "Vote for OK" and called his supporters the "OK Club" in his presidential campaign, and the campaign publicity established "OK" in the American lexicon.
"OK" and "Okay" Are Both OK
The two spellings peacefully coexist today: the Associate Press recommends "OK" and the Chicago Manual of Style recommends "okay." My publisher follows Chicago style for my books, but to honor the word's origins, I insist on "OK" instead of "okay." So far, they have been kind enough to indulge me.