Skip to main content
POST/users/:id/add_many_tags/

Add many tags

You can add a list of tags to a specific user.

Attributes

Optional unless marked required

idintegerrequired
A unique identifier for the contact which is given by User automatically.
tag_nameslist(string)required
A list of tag names.

Request​

curl -X POST "https://<your_app_subdomain>.user.com/api/public/users/:id/add_many_tags/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"tag_names": [
"Beta tester",
"Webinar"
]
}'

Response examples​

{
"tag_names": [
"Beta tester",
"Webinar"
]
}

A 400 names tag_names with one of these messages:

MessageWhen
This field is required.The body has no tag_names.
This list may not be empty.tag_names is an empty list.

The 404 comes back when no contact has that ID. The body is checked first, so a wrong body answers 400 even for an ID no contact has. Tags the contact already has are accepted again: the response is 200 and lists them as sent.

Response fields​

Fields returned in the 200 OK response body.

tag_namesarray of string
A list of tag names.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.