Add tags to entities

This method allows updating multiple entities. An array of entity objects is passed.

Limitations
The method is available in correspondence to the user rights.

Request parameters

It is important to note that all entity tags should be passed. If already attached tags are not passed, they will be detached from the entity.

ParameterData typeDescription
idintEntity ID
  • embedded[tags]
array|nullAdded tags data.
  • *Pass 'null' to detach tags from an entity**.
  • embedded[tags][0]
objectTag model. Either “id” or “name” parameter is required
  • embedded[tags][0][id]
intTag ID
  • embedded[tags][0][name]
stringTag name

An example of the request
In the following example we’ll update tags of 2 leads using the /api/v4/leads method.

[
    {
        "id": 167353,
        "_embedded": {
            "tags": [
                {
                    "id": 263807
                }
            ]
        }
    },
    {
        "id": 167355,
        "_embedded": {
            "tags": null
        }
    }
]

Data type header when the request is successful
Content-Type: application/hal+json

Data type header in case of an error
Content-Type: application/problem+json

Response parameters
The method returns an array of updated entities.

Path Params
string
enum
required

One of these: leads|contacts|companies

Allowed:
Body Params
RAW_BODY
array of objects
RAW_BODY
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json