Introduction

 

Developer Preview
APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.

 

The Contacts API provides functionality for adding and managing contacts on your site. When a new visitor shares contact information with your site, they're added to your Contact List. You can then access their contact details using the API.

A site visitor can become a contact through various methods, including but not limited to:

  • Completing forms such as event registrations, membership sign-ups, customer support inquiries, or billing address submissions.
  • Being manually added by a site collaborator.
  • Engaging with 3rd-party integrations that leverage the Contacts API, for example, logging in with social media. Learn more about how you can manage your contact list.

With the Contacts API, you can:

Before you begin

It is important to note the following points before you begin to code:

  • You can't label or unlabel a contact if the label does not yet exist. To create a label, use the Labels API.
  • Merging a contact is irreversible.
  • Site members and collaborators can only be used as the target contact when merging contacts.

To use the Contacts API, import { contacts } from the wix-crm.v2 module.

Copy
1

Permissions information

Functions in the Labels API are restricted and only run if you elevate permissions using the wix-auth elevate() function.

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

Terminology

  • Label: A tag that enables site admins to organize and group contacts.
  • Extended field: An additional property that store contact information.
  • Source contact: A contact you intend to merge into a target contact. These contacts get deleted after being merged.
  • Target contact: A contact that receives merged data from source contacts.
Was this helpful?
Yes
No