Assigning Tags

The api/subscribers/tags/set method is used to request the assignment of a tag to an existing recipient.

To assign a tag to a recipient, you need the recipient’s unique identifier, which is specified in the EXT_USER_ID parameter when the tag is created. Read more in the article.

Calling api/subscribers/tags/set method

To call the api/subscribers/tags/set method, send a POST request to the URL https://app.edna.io/api/subscribers/tags/set.

If the request is successful, the method returns a response with a code of 200.

Request Body Format

{
    "tag": {
        "name": "best_user"
    },
    "subscriber": [
        {
            "address": "test12345",
            "type": "EXT_USER_ID"
        }
    ]
}

Request Parameters

ParameterTypeDescription
tagobjectThe tag object.
tag.namestringThe name of the recipient’s tag.
subscriberarray of stringsThe array of recipient IDs.
subscriber.addressstringThe unique identifier of the recipient specified as the value of the EXT_USER_ID parameter when the recipient was created. Read more in the article.
subscriber.typestringThe type of the identifier. The value is EXT_USER_ID.

Response Example

[
    {
        "id": 66402870,
        "blacklisted": false,
        "addresses": [
            {
                "id": "09c2dc23-715e-4cde-8034-8ddfac6d91b5",
                "address": "test12345"
            }
        ],
        "parameterValues": [],
        "tagValues": [
            {
                "name": "best_user"
            }
        ]
    }
]

Errors

CodeErrorDescription
400Constraint ViolationValidation error.

Possible messages:

address cannot be null or blank The recipient’s unique identifier must not be empty.
must not be blank The parameter must not be empty.
size must be between 1 and 64 The number of characters in the tag name exceeds 64.