API
Se connecter
Documentation › Compte et IA › Créer un compte IA
POST

Créer un compte IA

POSThttps://app.sendapp.ai/api/create_accounts
Crée un nouveau compte/token pour un modèle IA personnalisé.
Paramètres
apikey obligatoire
Votre API Key.
name obligatoire
Nom du nouveau compte (3-255 caractères).
greetings_message facultatif
Message de bienvenue affiché par l'IA.
no_info_message facultatif
Message affiché lorsqu'aucune information n'est trouvée.
Requête
curl -X POST 'https://app.sendapp.ai/api/create_accounts' \
  -H 'Content-Type: application/json' \
  -d '{
    "apikey": "YOUR_API_KEY",
    "name": "Assistant Commercial",
    "greetings_message": "Bonjour ! Comment puis-je vous aider ?"
  }'
<?php
$ch = curl_init('https://app.sendapp.ai/api/create_accounts');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'apikey' => 'YOUR_API_KEY',
        'name'   => 'Assistant Commercial',
        'greetings_message' => 'Bonjour ! Comment puis-je vous aider ?',
    ]),
]);
echo curl_exec($ch);
curl_close($ch);
const res = await fetch('https://app.sendapp.ai/api/create_accounts', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    apikey: 'YOUR_API_KEY',
    name: 'Assistant Commercial',
    greetings_message: 'Bonjour ! Comment puis-je vous aider ?'
  })
});
console.log(await res.json());
Réponse (200 OK)
{
  "status": "success",
  "message": "Account token created successfully",
  "data": {
    "id": 42,
    "ids": "a1b2c3d4e5",
    "token": "trn_a1b2c3d4e5f6",
    "name": "Assistente Vendite",
    "greetings_message": "Ciao! Come posso aiutarti?",
    "no_info_message": "Mi dispiace, non ho questa informazione.",
    "created_at": "2026-07-13 10:00:00"
  }
}
Erreur
{
  "status": "error",
  "message": "You have reached the maximum number of accounts allowed"
}