Riferimento API
Azioni
Le azioni sono tutto ciò che fa l'app Okaymate, tramite l'API. Ognuna è uno strumento dell'app, lo stesso che il collega IA dell'attività usa nelle sue chat e che offre il server MCP. Agisce sull'attività della chiave come se ne fosse il proprietario, con gli stessi controlli dell'app.
Elencale per conoscere i loro nomi, cosa fa ciascuna e gli argomenti che accetta in JSON Schema, poi eseguine una con i suoi argomenti come body. Un'azione che legge soltanto funziona con l'Accesso in lettura. Una che modifica qualcosa richiede l'Accesso in lettura e scrittura.
L'account personale di qualcuno, il suo profilo, il piano, le attività, il link di affiliazione e le chat, non è mai accessibile con la chiave di un'attività. Creare una chiave, effettuare un pagamento, caricare un file ed eliminare un account si fanno solo nell'app.
L'oggetto azione
Un'azione dell'app Okaymate, come la usano il collega IA dell'attività e il server MCP.
Attributi
- objectstringSempre
action. - namestringIl nome dell'azione,
app_seguito da ciò su cui agisce, comeapp_knowledge. - descriptionstringCosa fa l'azione e come usare i suoi argomenti, in inglese.
- input_schemaobjectGli argomenti che accetta, in JSON Schema. Inviali come body di Esegui un'azione.
{
"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"]
}
}Elenca le azioni
Restituisce tutte le azioni dell'app, con il loro nome, cosa fa ciascuna e gli argomenti che accetta.
Restituisce
Un elenco di oggetti azione, tutti in una sola pagina.
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."
}
}
}
}
]
}L'oggetto risultato dell'azione
Cosa ha fatto un'azione.
Attributi
- objectstringSempre
action_result. - actionstringIl nome dell'azione.
- changedstring o nullLa parte dell'app modificata dall'azione,
nullse ha solo letto. Le pagine dell'app aperte che la mostrano la ricaricano. - resultobject o nullLa risposta dell'azione, così come compare nella pagina stessa dell'app. I suoi campi dipendono dall'azione. Non contiene mai alcun segreto.
{
"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"
}
}Esegui un'azione
Esegue un'azione sull'attività della chiave, con i suoi argomenti nel body come li nomina il suo input_schema. Con l'Accesso in lettura legge soltanto, e un'azione che modifica qualcosa richiede l'Accesso in lettura e scrittura.
Parametri di percorso
- namestringObbligatorioIl nome dell'azione, come lo dà Elenca le azioni.
Restituisce
Un oggetto risultato dell'azione.
Errori
- L'app ha rifiutato l'azione oppure l'azione non è riuscita. Il
messagespiega perché. - La chiave ha l'Accesso in lettura e l'azione, con questi argomenti, modifica qualcosa.
- 403account_onlyL'azione riguarda l'account personale di qualcuno e funziona solo per chi ha effettuato l'accesso a Okaymate.
- Nessuna azione con questo nome.
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"
}
}