Tags and tag families can be obtained programmatically via API using the endpoint /v1/settings/tag-families.
Get tags and tag families
Use the GET method with the /v1/settings/tag-families endpoint to get all tags and tag families.
In response to the API call, a list of the various tag families is sent, along with the tags they contain.
For each tag family, several elements are filled in:
-
Id: Identifier of the tag family -
Name: Name of the tag family -
Required: Indicates whether the tag family is required or optional during campaign creation -
Type: indicates whether the tag family allows a single value or multiple values are allowed
For each tag present within a tag family, several elements are filled in:
-
Id: Tag identifier -
Name: Tag name -
Channels: Channels for which the tag is activated (email, sms, push notification)
Good to know: Tags that are not enabled for at least one channel are not listed in the API call response.
If the list of tags and tag families is too large, it's useful to use the pagination options in the API call to enlarge the number of results or arrive at a specific results page.
The tag identifier (field id in the endpoint response /v1/settings/tag-families) will be requested in the campaign creation endpoint /v1/campaigns.
Conclusion
Tags and tag families can be retrieved programmatically via API at any time.