Assigns a tag to a specified lead. Note that you must have previously created the tag in your Kartra account (https://app.kartra.com/communication/tags).  

TypeParametersValues
POSTcmd*assign_tag
POSTtag_name*string

* Required fields Here is an example:

'lead' => [
    'email' => 'example@email.com'
],
'actions' => [
    '0' => [
        'cmd' => 'assign_tag',
        'tag_name' => 'tag name'
    ]
]

Success message:

{
  "status": "Success",
  "message": "Tag added to lead",
  "type": "103"
}
Error Cases:
Type NumberMessageCause
211Tag cannot be empty
  • 'tag_name' parameter it is mandatory and cannot be empty.
212Tag does not exist
  • The tag is not in our database.
An example of an error message:
{
  "status": "Error",
  "message": "Tag cannot be empty",
  "type": "211"
}