> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moustacheai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Créer ou mettre à jour un client

## Paramètres

<ParamField body="companyIdentifier" type="string" required>
  Identifiant unique du client (propre à **votre** système).
</ParamField>

<ParamField body="metadata" type="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.
</ParamField>

## 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. |

<RequestExample>
  ```bash cURL theme={null}
  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"
          }
        }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": "Customer created"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.