API-Referenz
Aktionen
Über Aktionen erledigst du per API alles, was die Okaymate-App kann. Jede Aktion ist ein Tool der App, dasselbe, mit dem das KI-Teammitglied des Business in seinen Chats arbeitet und das der MCP-Server bereitstellt. Sie läuft im Business des Schlüssels im Namen seines Inhabers und mit denselben Prüfungen wie in der App.
Liste sie auf, um zu sehen, wie sie heißen, was jede tut und welche Argumente sie als JSON Schema erwartet, und führe dann eine mit ihren Argumenten als Body aus. Eine Aktion, die nur liest, funktioniert mit Lesezugriff. Eine, die etwas ändert, braucht Lese- und Schreibzugriff.
Das eigene Konto einer Person, also Profil, Plan, Businesses, Affiliate-Link und Chats, ist mit dem Schlüssel eines Business nie erreichbar. Einen neuen Schlüssel erstellen, bezahlen, hochladen und ein Konto löschen kannst du nur in der App.
Das Aktionsobjekt
Eine Aktion der Okaymate-App, so wie das KI-Teammitglied des Business und der MCP-Server sie nutzen.
Attribute
- objectstringImmer
action. - namestringDer Name der Aktion,
app_und der Bereich, den sie bearbeitet, etwaapp_knowledge. - descriptionstringWas die Aktion tut und wie ihre Argumente zu verwenden sind, auf Englisch.
- input_schemaobjectDie Argumente, die sie erwartet, als JSON Schema. Sende sie als Body von Aktion ausführen.
{
"object": "action",
"name": "app_knowledge",
"description": "The customer chat's knowledge (in its settings: what the team taught it, entries with a title and a text): list, save (a new one without id, or change one: title, text), delete (id). The customer chat answers visitors from it and from the Public files.",
"input_schema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "list, save or delete.",
"enum": ["list", "save", "delete"]
},
"id": {
"type": "string",
"description": "The entry's id, to change or delete it."
},
"title": {
"type": "string",
"description": "Its title."
},
"text": {
"type": "string",
"description": "What it says."
}
},
"required": ["action"]
}
}Aktionen auflisten
Gibt alle Aktionen der App zurück, jeweils mit ihrem Namen, was sie tut und welche Argumente sie erwartet.
Rückgabe
Eine Liste von Aktionsobjekten, alle auf einer einzigen Seite.
curl https://okaymate.ai/api/v1/actions \
-H "Authorization: Bearer $OKAYMATE_API_KEY"{
"object": "list",
"data": [
{
"object": "action",
"name": "app_knowledge",
"description": "The customer chat's knowledge (in its settings: what the team taught it, entries with a title and a text): list, save (a new one without id, or change one: title, text), delete (id). The customer chat answers visitors from it and from the Public files.",
"input_schema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "list, save or delete.",
"enum": ["list", "save", "delete"]
},
"id": {
"type": "string",
"description": "The entry's id, to change or delete it."
},
"title": {
"type": "string",
"description": "Its title."
},
"text": {
"type": "string",
"description": "What it says."
}
},
"required": ["action"]
}
},
{
"object": "action",
"name": "app_customer_chat_install",
"description": "How the customer chat goes on the business's website (its install, in the customer chat's settings): get (the line to paste and the sites it may run on), sites (sets the sites it may run on: domains, like shop.com; replaces the list).",
"input_schema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "get or sites. Default get.",
"enum": ["get", "sites"]
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "For sites: the domains, like shop.com."
}
}
}
}
]
}Das Ergebnisobjekt
Was eine Aktion getan hat.
Attribute
- objectstringImmer
action_result. - actionstringDer Name der Aktion.
- changedstring oder nullDer Teil der App, den die Aktion geändert hat,
null, wenn sie nur gelesen hat. Offene Seiten der App, die ihn zeigen, laden ihn neu. - resultobject oder nullDie Antwort der Aktion, so wie die zugehörige Seite der App sie zeigt. Ihre Felder hängen von der Aktion ab. Ein Secret steht nie darin.
{
"object": "action_result",
"action": "app_knowledge",
"changed": "customer_chat",
"result": {
"id": "Kn4wT8pQ2z",
"title": "Opening hours",
"text": "Open Monday to Saturday, 9am to 7pm.",
"source": "team",
"question": null,
"createdAt": "2026-11-24T09:20:03.000Z",
"updatedAt": "2026-11-24T09:20:03.000Z"
}
}Aktion ausführen
Führt eine Aktion im Business des Schlüssels aus, mit ihren Argumenten als Body, so wie ihr input_schema sie benennt. Mit Lesezugriff liest sie nur, und eine Aktion, die etwas ändert, braucht Lese- und Schreibzugriff.
Pfadparameter
- namestringErforderlichDer Name der Aktion, aus Aktionen auflisten.
Rückgabe
Ein Ergebnisobjekt.
Fehler
- Die App hat die Aktion abgelehnt, oder sie ist fehlgeschlagen. Die
messagenennt den Grund. - Der Schlüssel hat Lesezugriff, und die Aktion ändert mit diesen Argumenten etwas.
- 403account_onlyDie Aktion betrifft das eigene Konto einer Person und funktioniert nur für jemanden, der bei Okaymate angemeldet ist.
- Keine Aktion mit diesem Namen.
curl -X POST \
https://okaymate.ai/api/v1/actions/app_knowledge \
-H "Authorization: Bearer $OKAYMATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "save",
"title": "Opening hours",
"text": "Open Monday to Saturday, 9am to 7pm."
}'{
"object": "action_result",
"action": "app_knowledge",
"changed": "customer_chat",
"result": {
"id": "Kn4wT8pQ2z",
"title": "Opening hours",
"text": "Open Monday to Saturday, 9am to 7pm.",
"source": "team",
"question": null,
"createdAt": "2026-11-24T09:20:03.000Z",
"updatedAt": "2026-11-24T09:20:03.000Z"
}
}