Skip to main content
POST
Add labels to an asset

Overview

Add labels to a specific asset by its ID. This endpoint enables programmatic labeling of individual assets based on custom logic, security findings, or business rules. Unlike the bulk endpoint (PATCH /v1/asset/labels), this endpoint targets a single asset, making it ideal for:
  • Programmatic labeling based on scan results or vulnerability findings
  • Building custom asset classification pipelines
  • Event-driven labeling (e.g., label assets when specific conditions are met)

Quick Example

Request Body

The labels array contains all labels you want to add to the asset. Existing labels are preserved - this endpoint always appends.

Response

Success Response

Error Responses

Asset Not Found:
Invalid Asset ID:

Use Cases

1. Manual Asset Review

After reviewing an asset, mark it as reviewed:

2. Security Assessment

Label assets after vulnerability assessment:

3. Incident Response

Quickly label compromised or suspicious assets:

4. Asset Ownership

Assign ownership or team responsibility:

Behavior & Important Notes

Label Appending

This endpoint always appends labels. It never removes existing labels:
  • Existing labels: ["prod", "api"]
  • Adding labels: ["critical"]
  • Result: ["prod", "api", "critical"]

Duplicate Prevention

Adding labels that already exist is safe - they won’t be duplicated:
  • Existing labels: ["prod", "api"]
  • Adding labels: ["api", "critical"]
  • Result: ["prod", "api", "critical"] (not ["prod", "api", "api", "critical"])

Empty Labels Array

Sending an empty labels array has no effect:

Getting the Asset ID

You can retrieve asset IDs from enumeration contents:

From Enumeration Contents

Response includes id field:

Authorizations

X-API-Key
string
header
required

Headers

X-Team-Id
string

Path Parameters

asset_id
integer<int64>
required

Body

application/json
labels
string[]
required

Response

Example response

message
string
required