Apply a custom tag to an asset, auto-creating the tag if needed.
What this endpoint does
Applies a single custom tag to a specific asset within an ASI project. The tag is created automatically if it does not already exist. Tags are case-insensitive for filtering but preserve their original casing. The asset_id is the asset's domain or IP address (e.g., example.com or 192.0.2.1), obtainable from ASI Assets: Find. For applying multiple tags at once, use ASI Assets: Bulk Add/Remove Tags.
The operation is asynchronous — the API waits up to 2 seconds for backend completion. If complete is false in the response, poll for completion using Tagging: Get Task Status with the returned task_ids. Even when complete is true, allow up to 5 minutes for the tag to appear in filter queries.
Response data
Returns the tag operation outcome — which tags were applied, which assets were affected, and whether the backend finished processing. When complete is false, use the task_ids array to poll for completion before assuming the tag is queryable.
