labelContact( )


Adds labels to a contact.

The labelContact() function returns a Promise that resolves when the specified labels are added to the contact.

Note: Only visitors with Manage Contacts permissions can label contacts. You can override the permissions by setting the suppressAuth option to true.

Method Declaration
Copy
Method Parameters
contactIdstringRequired

ID of the contact to add labels to.


labelKeysArray<string>Required

List of label keys to add to the contact.

Label keys must exist to be added to the contact. Contact labels can be created or retrieved with findOrCreateLabel() or queryLabels().


optionsAuthOptions

Authorization options.

Returns
Return Type:Promise<Contact>
Did this help?