curl -X POST https://api.moustacheai.com/api/v1/customers \
-H "Authorization: Bearer MON_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"companyIdentifier": "CLIENT_123",
"metadata": {
"email": "contact@client.fr",
"nom": "Société Exemple"
}
}'
{
"success": "Customer created"
}
Clients
Créer ou mettre à jour un client
POST
/
api
/
v1
/
customers
curl -X POST https://api.moustacheai.com/api/v1/customers \
-H "Authorization: Bearer MON_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"companyIdentifier": "CLIENT_123",
"metadata": {
"email": "contact@client.fr",
"nom": "Société Exemple"
}
}'
{
"success": "Customer created"
}
Paramètres
string
required
Identifiant unique du client (propre à votre système).
object
required
Méta-données librement définies (nom, email, etc.). Toutes les clefs et
valeurs doivent être des chaînes de caractères.
Réponses
| Code | Signification |
|---|---|
| 200 | Création ou mise à jour réussie ({ success: "…" }). |
| 400 | Paramètres manquants. |
| 401 | Token d’API invalide. |
| 500 | Erreur interne. |
curl -X POST https://api.moustacheai.com/api/v1/customers \
-H "Authorization: Bearer MON_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"companyIdentifier": "CLIENT_123",
"metadata": {
"email": "contact@client.fr",
"nom": "Société Exemple"
}
}'
{
"success": "Customer created"
}
Was this page helpful?