findOrCreateLabel( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a label with a given name, or creates one if it doesn't exist.

The findOrCreateLabel() function returns a Promise that resolves when the specified label is found or created.

Successful calls to findOrCreateLabel() always returns a label, which can be passed to subsequent function calls.

To find an existing label without potentially creating a new one, use getLabel() or queryLabels().

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Members and Contacts - all permissions
Manage Contact Labels
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
displayNamestringRequired

Display name to retrieve or create.

If an existing label is an exact match for the specified display name, the existing label is returned. If not, a new label is created and returned.


optionsFindOrCreateLabelOptions

Language options.

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