Mettre à jour un contact avec l'API Chatwoot

Met à jour un contact : envoyez uniquement les champs à modifier.

Identifiant
chatwoot_update_contact

L'appel

POST https://connect.reportei.com/api/tools/chatwoot_update_contact/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "account_id": 1,
    "contact_id": 1
  }
}

Votre système envoie l'id de la connexion de votre client et les arguments de la tool. Les headers sont les mêmes que pour toute l'API Connect : le token de votre produit et celui de votre client.

Paramètres

Les descriptions des paramètres suivent la documentation officielle de l'app, en anglais.

ParamètreTypeObligatoireDescription
account_idintegerOuiId of the Chatwoot account: the id of one of the accounts from Get profile, also shown in the dashboard URL after /accounts/, as in app.chatwoot.com/app/accounts/123.
contact_idintegerOuiId of the contact, from Search contacts.
namestringNonName of the contact.
emailstringNonEmail address of the contact.
phone_numberstringNonPhone number in international format, with plus sign and country code, such as +5511999999999.
identifierstringNonUnique id of the contact in your own system.
blockedbooleanNontrue blocks the contact; false unblocks it.
avatar_urlstringNonURL of a JPEG or PNG image for the avatar of the contact.
additional_attributesobjectNonFree attributes of the contact, such as city, country or company_name.
custom_attributesobjectNonCustom attribute values keyed by attribute key. Each key needs a contact custom attribute definition in the account.

Connexions possibles

Votre client connecte son compte Chatwoot une seule fois, avec l'un des modes ci-dessous. La même connexion sert à toutes les tools du toolkit.

Clé d'API

Votre client colle la clé de l'app sur un écran de Connect, ou votre système envoie la clé avec POST /api/customer-toolkits, sans écran.

La réponse

En cas de succès, Connect conserve le statut et le corps de la réponse de l'app. Les erreurs HTTP renvoyées par l'app utilisent l'objet {error, api_error} ; l'authentification ou la validation peuvent échouer avant l'exécution. Le header X-Toolkit-Execution-Id identifie l'exécution enregistrée, consultable avec GET /api/tools/executions/{uuid}.

Prête pour les agents IA

L'input de cette tool est un JSON Schema, disponible via GET /api/tools/chatwoot_update_contact. Il devient la définition de tool de votre agent sans conversion.

Autres tools Chatwoot

Voir les 15 tools

Toolkits de la même catégorie

Voir les 100 toolkits

Voyez Connect appliqué à votre produit.

Essayez-le pendant 15 jours sans carte, ou présentez votre cas à notre équipe.