POST /v1/actions/update-contact

Met à jour un contact existant par id ou téléphone. Seuls les champs présents dans le corps sont touchés.

Met à jour un contact existant. Recherche par contact_id ou phone. Seuls les champs présents dans le corps sont écrits — omettez un champ pour le laisser inchangé. metadata est fusionné, et non remplacé.

POST /api/v1/actions/update-contact

Corps de la requête

Champ Type Requis Notes
contact_id UUID l'un des deux Recherche par id
phone string l'un des deux Recherche par téléphone (normalisé)
name string non Passez "" pour effacer
email string non Passez "" pour effacer
tags string non CSV. Remplace la liste de tags du contact. Pour ajouter/retirer des tags individuels, utilisez add-tag / remove-tag.
metadata object non Fusionné en surface avec les métadonnées existantes

Vous devez passer soit contact_id soit phone — les deux ne sont pas requis, mais au moins l'un.

curl -X POST https://www.qyvo.io/api/v1/actions/update-contact \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+14155550123",
    "metadata": { "lifetime_value": 9120.00 }
  }'
const contact = await fetch('https://www.qyvo.io/api/v1/actions/update-contact', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QYVO_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    phone: '+14155550123',
    metadata: { lifetime_value: 9120.0 },
  }),
}).then((r) => r.json());
$contact = Http::withToken(env('QYVO_TOKEN'))
    ->post('https://www.qyvo.io/api/v1/actions/update-contact', [
        'phone' => '+14155550123',
        'metadata' => ['lifetime_value' => 9120.0],
    ])
    ->json();
import os, httpx
contact = httpx.post(
    'https://www.qyvo.io/api/v1/actions/update-contact',
    headers={'Authorization': f"Bearer {os.environ['QYVO_TOKEN']}"},
    json={'phone': '+14155550123', 'metadata': {'lifetime_value': 9120.0}},
).json()

Réponse — 200 OK

{
  "id": "01J1Y...",
  "phone": "+14155550123",
  "name": "Romain",
  "email": "[email protected]",
  "tags": ["vip"],
  "updated_at": "2026-05-07T08:14:23+00:00"
}

Erreurs

Statut Cause
404 Contact not found
422 Ni contact_id ni phone fourni