Getting started
Authentication
Every request carries a secret key of the business it works on. You make keys in the app, can limit them to reading, and they stop working the moment you revoke them.
API keys
- A key is
ok_live_followed by 24 letters and digits. The app shows its first characters, so you can tell your keys apart. - Each key opens one business and only sees that business's leads, stats, files, connections and webhooks.
- Only the business's owner or an admin can create a key, on the business's API page.
- The whole key shows once, when you create it. Okaymate keeps only a hash of it, so a lost key cannot be shown again. Create a new one.
Send the key
Send the key as a bearer token in the Authorization header. The X-Api-Key header works too, for the tools that cannot set a bearer token.
A request without a key answers 401 with the code missing_api_key, a wrong or revoked key invalid_api_key.
# As a bearer token
curl https://okaymate.ai/api/v1/business \
-H "Authorization: Bearer $OKAYMATE_API_KEY"
# Or in X-Api-Key, for tools that cannot set a bearer token
curl https://okaymate.ai/api/v1/business \
-H "X-Api-Key: $OKAYMATE_API_KEY"Access
A key has Read access or Read and write access, its scopes read, or read and write. Give write access only to the tools that change data.
| Access | Allows |
|---|---|
Read access, read | Every GET, the business, leads and their messages, stats, files, connections and webhook endpoints. |
Read and write access, read and write | Everything Read access allows, and every request that changes data, POST, PATCH and DELETE, like answering a visitor. |
A key with Read access that tries to change data gets 403 with the code insufficient_scope.
Retrieve the business
Returns the business the key opens. A good first call to check a key.
Returns
The business object.
Errors
- The request has no key.
- The key is wrong or was revoked.
curl https://okaymate.ai/api/v1/business \
-H "Authorization: Bearer $OKAYMATE_API_KEY"{
"object": "business",
"id": "Bk7Qm2xWpL",
"name": "Lumen Studio",
"slug": "lumen-studio",
"website": "https://lumenstudio.com",
"color": "#7c5cff",
"created_at": "2026-11-02T10:14:22.000Z"
}Keep keys safe
- Call the API from your server only, never from a browser, a mobile app or the code of a public repository.
- Keep keys in a secret manager or an environment variable like
OKAYMATE_API_KEY. - Give each tool its own key, so you can revoke one without touching the others.
- To rotate a key, create the new one, deploy it, then revoke the old one in the app.
AI assistants
The same key works on the MCP server. A key with Read access gets its reading tools only, account, conversation_stats, recent_messages and website_conversations. claude.ai, Claude Desktop and ChatGPT connect with OAuth instead, there is no key to copy. Their connection shows on the API page as a key named after the app, Claude or ChatGPT.