Update a contact
client.contacts.update(stringphoneNumber, ContactUpdateParams { assigned_to_email, assignedToEmail, company_name, 9 more } body, RequestOptionsoptions?): ContactUpdateResponse { contact, status }
PUT/api/v2/contacts/{phone_number}
Update an existing contact
Parameters
phoneNumber: string
Returns
Update a contact
import SendblueAPI from 'sendblue';
const client = new SendblueAPI({
apiKey: process.env['SENDBLUE_API_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SENDBLUE_API_API_SECRET'], // This is the default and can be omitted
});
const contact = await client.contacts.update('+1234567890');
console.log(contact.contact);{
"contact": {
"assigned_to_email": "[email protected]",
"company_name": "Example Corp",
"created_at": "2024-01-15T10:30:00Z",
"custom_variables": {
"Lead Source": "Website",
"Plan": "Enterprise"
},
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890",
"sendblue_number": "+1987654321",
"tags": [
"customer",
"vip"
],
"verified": true
},
"status": "OK"
}Returns Examples
{
"contact": {
"assigned_to_email": "[email protected]",
"company_name": "Example Corp",
"created_at": "2024-01-15T10:30:00Z",
"custom_variables": {
"Lead Source": "Website",
"Plan": "Enterprise"
},
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890",
"sendblue_number": "+1987654321",
"tags": [
"customer",
"vip"
],
"verified": true
},
"status": "OK"
}