APITags

Set target tags

Replace the full set of tags assigned to a single target.

PUT
/tag-assignments/{target_type}/{target_key}

Replace the full set of tags assigned to a single target.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

manage_tags

Path Parameters

target_type*string

The kind of entity a tag is assigned to.

Value in"agent_slug""mcp""tool"
target_key*string

Request Body

application/json
  1. body

The complete set of tags to assign to a target.

tag_ids*array<>

IDs of the tags to assign. Replaces any tags already on the target.

Itemsitems <= 100

Response Body

The request has succeeded.

application/json
  1. response

The complete set of tags to assign to a target.

tag_ids*array<>

IDs of the tags to assign. Replaces any tags already on the target.

Itemsitems <= 100
Example Request
curl -X PUT 'https://your-org.aisecurity.services.us.connect.secureauth.com/api/v1/tag-assignments/agent_slug/string' \  -H 'Content-Type: application/json' \  -d '{  "tag_ids": [    "f822a538-5d10-4249-89b6-dd557ee5945e"  ]}'
Example Response
{  "tag_ids": [    "f822a538-5d10-4249-89b6-dd557ee5945e"  ]}