Getting started
Okaymate API
Bring your business's Okaymate into your own tools. A REST API, signed webhooks and an MCP server for AI assistants, all on one key.
Before you start
Every endpoint lives under https://okaymate.ai/api/v1, takes and returns JSON with snake_case fields, and writes every date and time in ISO 8601, in UTC.
https://okaymate.ai/api/v1Get an API key
In Okaymate, open your business, then its API page. Only the business's owner or an admin can create a key. Name it after the tool that uses it and choose its access, Read access to read, or Read and write access to also act, like answering a visitor.
The key starts with ok_live_ and shows once, so put it right away in your secret manager or in your environment. A key opens one business and only ever sees its data.
export OKAYMATE_API_KEY="ok_live_…"Make your first request
Check the key with Retrieve the business. Every request sends the key in the Authorization header, as a bearer token.
The answer is the business the key opens. The next samples read the key from an environment variable, OKAYMATE_API_KEY.
curl https://okaymate.ai/api/v1/business \
-H "Authorization: Bearer ok_live_…"{
"object": "business",
"id": "Bk7Qm2xWpL",
"name": "Lumen Studio",
"slug": "lumen-studio",
"website": "https://lumenstudio.com",
"color": "#7c5cff",
"created_at": "2026-11-02T10:14:22.000Z"
}Read your leads
Leads are the visitors of your customer chat, the chat on your website. List them, the latest activity first, then read a visitor's conversation with List a lead's messages.
Lists come a page at a time. Follow next_cursor while has_more is true, as Pagination shows.
curl -G https://okaymate.ai/api/v1/leads \
-H "Authorization: Bearer $OKAYMATE_API_KEY" \
-d limit=20{
"object": "list",
"data": [
{
"object": "lead",
"id": "k3v9q2m7x4w8n1p6",
"name": "Emma",
"message_count": 2,
"last_message": {
"object": "message",
"id": "b2n7x4w8p5",
"lead": "k3v9q2m7x4w8n1p6",
"direction": "out",
"author": "Lumen Studio",
"text": "Yes, Beginners Flow runs every Saturday at 10am. Want me to save you a spot?",
"files": [],
"created_at": "2026-11-24T09:12:51.000Z"
},
"last_message_at": "2026-11-24T09:12:51.000Z"
}
],
"has_more": true,
"next_cursor": "MjAyNi0xMS0yMlQxNjo0MDoxMi4wMDBa"
}Receive your first webhook
Webhooks push events to your server the moment they happen, so you never poll. Register a public HTTPS URL for lead.created and message.received, keep the secret of the response, then send yourself a test event.
Check every request with its Okaymate-Signature header, as Verify signatures shows. You can also add the endpoint in the app, on the API page.
curl -X POST https://okaymate.ai/api/v1/webhook_endpoints \
-H "Authorization: Bearer $OKAYMATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/okaymate",
"events": ["lead.created", "message.received"],
"description": "Helpdesk sync"
}'curl -X POST \
https://okaymate.ai/api/v1/webhook_endpoints/wh3LpX9dKe/test \
-H "Authorization: Bearer $OKAYMATE_API_KEY"Connect an AI assistant
Okaymate's MCP server at https://okaymate.ai/mcp gives Claude your business, its chats and Okaymate's tools, right in the chat. The same API key works on it.
In Claude Code, one command connects it with your key. claude.ai, Claude Desktop and ChatGPT connect with a sign-in instead, as MCP setup shows.
claude mcp add --transport http okaymate https://okaymate.ai/mcp \
--header "Authorization: Bearer $OKAYMATE_API_KEY"