curl -X POST https://api.magpipe.ai/functions/v1/update-contact \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact_id": "c1d2e3f4-5678-9abc-def0-123456789abc",
"notes": "Prefers afternoon appointments",
"add_tags": ["premium"]
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/update-contact',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
contact_id: 'c1d2e3f4-5678-9abc-def0-123456789abc',
notes: 'Prefers afternoon appointments',
add_tags: ['premium']
}),
}
);
const contact = await response.json();
console.log('Updated:', contact.updated_at);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/update-contact',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'contact_id': 'c1d2e3f4-5678-9abc-def0-123456789abc',
'notes': 'Prefers afternoon appointments',
'add_tags': ['premium']
}
)
contact = response.json()
print(f"Updated: {contact['updated_at']}")
{
"id": "c1d2e3f4-5678-9abc-def0-123456789abc",
"phone_number": "+14155551234",
"name": "John Smith",
"email": "john@example.com",
"company": "Acme Corp",
"notes": "Prefers afternoon appointments",
"tags": ["customer", "vip", "premium"],
"updated_at": "2024-01-16T09:00:00Z"
}
Contacts
Update Contact
Update an existing contact’s information
POST
/
update-contact
curl -X POST https://api.magpipe.ai/functions/v1/update-contact \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact_id": "c1d2e3f4-5678-9abc-def0-123456789abc",
"notes": "Prefers afternoon appointments",
"add_tags": ["premium"]
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/update-contact',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
contact_id: 'c1d2e3f4-5678-9abc-def0-123456789abc',
notes: 'Prefers afternoon appointments',
add_tags: ['premium']
}),
}
);
const contact = await response.json();
console.log('Updated:', contact.updated_at);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/update-contact',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'contact_id': 'c1d2e3f4-5678-9abc-def0-123456789abc',
'notes': 'Prefers afternoon appointments',
'add_tags': ['premium']
}
)
contact = response.json()
print(f"Updated: {contact['updated_at']}")
{
"id": "c1d2e3f4-5678-9abc-def0-123456789abc",
"phone_number": "+14155551234",
"name": "John Smith",
"email": "john@example.com",
"company": "Acme Corp",
"notes": "Prefers afternoon appointments",
"tags": ["customer", "vip", "premium"],
"updated_at": "2024-01-16T09:00:00Z"
}
Update any fields for an existing contact. Only include fields you want to change.
Request Body
Response
Returns the updated contact object.curl -X POST https://api.magpipe.ai/functions/v1/update-contact \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact_id": "c1d2e3f4-5678-9abc-def0-123456789abc",
"notes": "Prefers afternoon appointments",
"add_tags": ["premium"]
}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/update-contact',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
contact_id: 'c1d2e3f4-5678-9abc-def0-123456789abc',
notes: 'Prefers afternoon appointments',
add_tags: ['premium']
}),
}
);
const contact = await response.json();
console.log('Updated:', contact.updated_at);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/update-contact',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'contact_id': 'c1d2e3f4-5678-9abc-def0-123456789abc',
'notes': 'Prefers afternoon appointments',
'add_tags': ['premium']
}
)
contact = response.json()
print(f"Updated: {contact['updated_at']}")
{
"id": "c1d2e3f4-5678-9abc-def0-123456789abc",
"phone_number": "+14155551234",
"name": "John Smith",
"email": "john@example.com",
"company": "Acme Corp",
"notes": "Prefers afternoon appointments",
"tags": ["customer", "vip", "premium"],
"updated_at": "2024-01-16T09:00:00Z"
}