POST /v1/actions/add-tag
Add a tag to a contact. Creates the tag if it doesn't exist.
Adds a tag to a contact. If the tag doesn't exist in the tenant, it's created. The contact-tag link is idempotent — adding a tag that's already attached is a no-op.
POST /api/v1/actions/add-tag
Request body
| Field | Type | Required |
|---|---|---|
contact_id |
UUID | one of |
phone |
string | one of |
tag |
string | yes |
curl -X POST https://www.qyvo.io/api/v1/actions/add-tag \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155550123", "tag": "vip-2026"}'
const result = await fetch('https://www.qyvo.io/api/v1/actions/add-tag', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QYVO_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ phone: '+14155550123', tag: 'vip-2026' }),
}).then((r) => r.json());
$result = Http::withToken(env('QYVO_TOKEN'))
->post('https://www.qyvo.io/api/v1/actions/add-tag', [
'phone' => '+14155550123',
'tag' => 'vip-2026',
])
->json();
import os, httpx
result = httpx.post(
'https://www.qyvo.io/api/v1/actions/add-tag',
headers={'Authorization': f"Bearer {os.environ['QYVO_TOKEN']}"},
json={'phone': '+14155550123', 'tag': 'vip-2026'},
).json()
Response — 200 OK
{
"id": "01J1Y...",
"phone": "+14155550123",
"tag_added": "vip-2026",
"tags": ["vip-2026", "fr-FR"]
}
Errors
| Status | Cause |
|---|---|
404 |
Contact not found |
422 |
Neither contact_id nor phone provided |
