KSC Open API
Kaspersky Security Center API description
ListTags::AddTag ( wstring  szwTagValue,
params  pParams = NULL 
)

Add a new tag.

Allows to add a new tag value that can be set for a list item

Parameters:
szwTagValuenon-empty tag value of type (wstring)
pParamsreserved. (params)

See also Python code with use of KlAkOAPI Python package below:

        server = KlAkOAPI.AdmServer.KlAkAdmServer.Create("https://ksc.example.com:13299", "username", "password", verify = False)
        oTagsControl = KlAkOAPI.ListTags.KlAkListTags(server, 'HostsTags')
        # set "CustomTag" for host
        oTagsControl.AddTag("CustomTag", {})