The Labels API provides functionality for managing contact labels on a site. Labels allow Wix users to segment or categorize contacts, customizing their contacts organization according to their needs. For example, they can use labels to target specific audiences for email campaigns or bulk actions.
With the Labels API, you can:
Learn more about Creating and Using Contact Labels.
It's important to note the following points before you begin to code:
Label that was found or created.
Label namespace.
Labels created by calling the Find Or Create Label method
are automatically assigned to the custom
namespace.
Display name for the namespace, used to organize the list of labels in the site dashboard.
Label key.
key
is generated when the label is created.
It can't be modified, even if displayName
is updated.
Label display name shown in the dashboard.
Label type indicating how the label was created.
Date and time the label was created.
Date and time the label was last updated.
Lists all contact labels for a site.
You can only call this method when authenticated as a Wix app or Wix user identity.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Retrieves a label with a specified name, or creates one if it doesn't exist.
Successful calls to this method always return a label, which can be specified in subsequent calls.
For example, in the Contacts API, Label Contact and Unlabel Contact calls will fail if you include a non-existent label. To ensure successful calls, you can call this method first, and then use the response in the Label Contact and Unlabel Contact calls.
To find an existing label without potentially creating a new one, call Get Label or Query Labels.
You can only call this method when authenticated as a Wix app or Wix user identity.
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.
Retrieves a label by the specified label key.
You can only call this method when authenticated as a Wix app or Wix user identity.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Deletes the specified label from a site and removes it from the contacts it applies to.
You can only call this method when authenticated as a Wix app or Wix user identity.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Renames a label.
You can only call this method when authenticated as a Wix app or Wix user identity.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Retrieves a list of contact labels. Up to 1,000 labels can be returned per request.
For a detailed list of supported operations, see sorting and filtering for labels. To learn how to query labels, see API Query Language.
You can only call this method when authenticated as a Wix app or Wix user identity.
There are 6 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.
Triggered when a label is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.contacts.v4.label
.
Event name. Expected created
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
Triggered when a label is deleted.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.contacts.v4.label
.
Event name. Expected deleted
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
Triggered when a label is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.contacts.v4.label
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.