chatbot6 API
Gestisci tutti i tuoi chatbot dal tuo codice con una semplice API REST: le stesse azioni del server MCP e dell’assistente dello studio, con la chiave del tuo account.
La tua chiave
Accedi per vedere la tua chiave. Per ogni account viene creata automaticamente una chiave.
AccediIndirizzo base
https://chatbot6.com/api/v1
Autenticazione
Invia la tua chiave nell’intestazione Authorization. Ogni chiave può fare 120 richieste al minuto. Aggiungi ?lang=tr (o un altro codice lingua) per ricevere i link in quella lingua.
Authorization: Bearer your_key
Endpoint
GET/chatbotsElenca i tuoi chatbot con stato, iscritti e link.
Esempio
curl https://chatbot6.com/api/v1/chatbots \ -H "Authorization: Bearer your_key"
POST/chatbotsCrea un chatbot in bozza. Corpo: name e, facoltativi, tagline, category, instructions, greeting, locale.
Esempio
curl -X POST https://chatbot6.com/api/v1/chatbots \
-H "Authorization: Bearer your_key" \
-H "Content-Type: application/json" \
-d '{"name":"Support bot","category":"support","locale":"en"}'GET/chatbots/{id}Tutti i dettagli di un chatbot: testi, istruzioni, modello, piani e ultimi 30 giorni.
Esempio
curl https://chatbot6.com/api/v1/chatbots/{id} \
-H "Authorization: Bearer your_key"PATCH/chatbots/{id}Modifica solo i campi che invii: name, tagline, keywords, category, instructions, greeting, starters, features, color, locale, folderId.
Esempio
curl -X PATCH https://chatbot6.com/api/v1/chatbots/{id} \
-H "Authorization: Bearer your_key" \
-H "Content-Type: application/json" \
-d '{"greeting":"Hi! How can I help?"}'PUT/chatbots/{id}/knowledgeSostituisce o amplia il testo delle conoscenze. Corpo: text e mode (replace o append).
Esempio
curl -X PUT https://chatbot6.com/api/v1/chatbots/{id}/knowledge \
-H "Authorization: Bearer your_key" \
-H "Content-Type: application/json" \
-d '{"text":"Opening hours: 9 to 18.","mode":"append"}'POST/chatbots/{id}/publishPubblica ({"live": true}) o riporta in bozza ({"live": false}).
Esempio
curl -X POST https://chatbot6.com/api/v1/chatbots/{id}/publish \
-H "Authorization: Bearer your_key" \
-H "Content-Type: application/json" \
-d '{"live":true}'GET/chatbots/{id}/postsArticoli del blog del sito del chatbot con il loro stato.
Esempio
curl https://chatbot6.com/api/v1/chatbots/{id}/posts \
-H "Authorization: Bearer your_key"POST/chatbots/{id}/postsNuovo articolo del blog (title, body in Markdown, summary, publishAt, draft), oppure {"ai": true, "topic": "..."} per farlo scrivere all’IA.
Esempio
curl -X POST https://chatbot6.com/api/v1/chatbots/{id}/posts \
-H "Authorization: Bearer your_key" \
-H "Content-Type: application/json" \
-d '{"ai":true,"topic":"Five ways to answer customers faster"}'PUT/chatbots/{id}/posts/{postId}Sostituisce un articolo del blog con titolo e testo completi.
Esempio
curl -X PUT https://chatbot6.com/api/v1/chatbots/{id}/posts/{postId} \
-H "Authorization: Bearer your_key" \
-H "Content-Type: application/json" \
-d '{"title":"Hello","body":"Updated text in **Markdown**."}'DELETE/chatbots/{id}/posts/{postId}Elimina un articolo del blog.
Esempio
curl -X DELETE https://chatbot6.com/api/v1/chatbots/{id}/posts/{postId} \
-H "Authorization: Bearer your_key"GET/foldersCartelle dello studio.
Esempio
curl https://chatbot6.com/api/v1/folders \ -H "Authorization: Bearer your_key"
POST/foldersCrea una cartella. Corpo: name.
Esempio
curl -X POST https://chatbot6.com/api/v1/folders \
-H "Authorization: Bearer your_key" \
-H "Content-Type: application/json" \
-d '{"name":"Clients"}'GET/statsI tuoi numeri degli ultimi 30 giorni su tutti i chatbot.
Esempio
curl https://chatbot6.com/api/v1/stats \ -H "Authorization: Bearer your_key"
Errori
Gli errori restituiscono {"error": "<code>"}: 401 chiave mancante o errata, 400 input non valido, 404 non trovato, 409 limite raggiunto, 429 troppe richieste.
Usi invece un’app di IA? Collega il server MCP. Ogni chatbot ha anche una propria API e un proprio server MCP per i suoi utenti (chat e blog). Li trovi nella pagina sviluppatori del sito del chatbot.