APIリファレンス
アクション
アクションを使うと、Okaymateアプリでできることのすべてを、APIから行えます。どのアクションもアプリのツールで、ビジネスのAIチームメイトがチャットで使うもの、MCPサーバーが提供するものと同じです。キーのビジネスに対し、オーナーの権限で、アプリと同じチェックを経て実行されます。
一覧を取得すると、各アクションの名前、内容、受け付ける引数のJSON Schemaがわかります。そのうえで、引数をボディに入れて1つ実行します。読み取るだけのアクションは、読み取り権限で使えます。何かを変更するアクションには、読み取りと書き込みの権限が必要です。
個人のアカウント、つまりプロフィール、プラン、ビジネス、アフィリエイトリンク、チャットは、ビジネスのキーでは使えません。新しいキーの作成、支払い、アップロード、アカウントの削除は、アプリでのみ行えます。
アクションオブジェクト
Okaymateアプリのアクション1つ。ビジネスのAIチームメイトやMCPサーバーが使うものと同じです。
属性
- objectstring常に
actionです。 - namestringアクションの名前。
app_knowledgeのように、app_のあとに操作の対象が続きます。 - descriptionstringアクションの内容と引数の使い方。英語で書かれています。
- input_schemaobject受け付ける引数。JSON Schema形式です。アクションを実行のボディとして送ります。
アクションオブジェクト
{
"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"]
}
}アクションを一覧表示
GET/v1/ actions読み取り権限
アプリのすべてのアクションを、その名前、内容、受け付ける引数とともに返します。
戻り値
アクションオブジェクトのリスト。すべてが1ページで返ります。
GET/v1/ actions
curl https://okaymate.ai/api/v1/actions \
-H "Authorization: Bearer $OKAYMATE_API_KEY"レスポンス200
{
"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."
}
}
}
}
]
}アクション結果オブジェクト
アクションの実行結果。
属性
- objectstring常に
action_resultです。 - actionstringアクションの名前。
- changedstringまたはnullアクションが変更したアプリの部分。読み取りだけの場合は
nullです。その部分を表示しているアプリのページが開いていれば、内容が読み込み直されます。 - resultobjectまたはnullアクションの応答。アプリのページにあるのと同じ内容です。フィールドはアクションによって異なります。シークレットが含まれることはありません。
アクション結果オブジェクト
{
"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"
}
}アクションを実行
POST/v1/ actions/ :name読み取り権限
キーのビジネスでアクションを1つ実行します。ボディには、input_schemaにある名前で引数を入れます。読み取り権限でできるのは読み取りだけで、何かを変更するアクションには読み取りと書き込みの権限が必要です。
パスパラメーター
- namestring必須アクションの名前。アクションを一覧表示で確認できます。
戻り値
エラー
- アプリがアクションを拒否したか、アクションが失敗しました。
messageにその理由が入ります。 - キーは読み取り権限ですが、指定した引数では、このアクションは何かを変更します。
- 403account_onlyこのアクションは個人のアカウントに関するもので、Okaymateにログインしている人しか使えません。
- この名前のアクションはありません。
POST/v1/ actions/ :name
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."
}'レスポンス200
{
"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"
}
}