Update Contacts Tags
POST/contacts/bulk/tags/update/:type
Allows you to update tags to multiple contacts at once, you can add or remove tags from the contacts
Request
Version stringrequired
API Version
Available options
v3- application/json
- Body
- Example (auto)
Bodyrequired
contactsstring[]required
list of contact ids to be processed
tagsstring[]required
list of tags to be added or removed
locationIdstringrequired
location id from where the bulk request is executed
removeAllTagsboolean
Option to implement remove all tags. if true, all tags will be removed from the contacts. Can only be used with remove type.
{
"contacts": [
"qFSqySFkVvNzOSqgGqFi",
"abcdef",
"qFSqySFkVvNzOSqgGqFi",
"3ualbhnV7j3n3a9r2moD"
],
"tags": [
"tag-1",
"tag-2"
],
"locationId": "asdrwHvLUxlfw5SqKVCN",
"removeAllTags": "false"
}
Successful response
- application/json
- Schema
- Example (auto)
Schema
succeededbooleanrequired
Indicates if the operation was successful
succededbooleanrequireddeprecated
Legacy misspelling of succeeded. Deprecated; use succeeded.
errorCountnumberrequired
Number of errors encountered during the operation
responsesstring[]required
Responses for each contact processed
{
"succeeded": true,
"errorCount": 0,
"responses": [
{
"contactId": "qFSqySFkVvNzOSqgGqFi",
"message": "Tags updated",
"type": "success",
"oldTags": [
"tag-1",
"tag-2"
],
"tagsAdded": [],
"tagsRemoved": []
},
{
"contactId": "abcdef",
"message": "contact id is not a valid firebase id",
"type": "error"
},
{
"contactId": "qFSqySFkVvNzOSqgGqFi",
"message": "contact is deleted",
"type": "error"
},
{
"contactId": "3ualbhnV7j3n3a9r2moD",
"message": "contact does not belong to location",
"type": "error"
}
]
}