Assign Knowledgebase Tags

Assign tags to a training asset (URL, text, file, or media). This **replaces** all existing tags on the asset with the provided tags. **Permission required:** Training > Write

Assign tags to a training asset (URL, text, file, or media). This replaces all existing tags on the asset with the provided tags.

Permission required: Training > Write

POST
/linkKnowledgebaseTags

Authorization

bearerToken

AuthorizationBearer <token>

API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.

In: header

Request Body

application/json

project_uid*string

Project identifier.

id*integer

Asset ID.

asset_type*string

Type of training source.

Value in"url" | "file" | "text" | "media"
tags?string

Comma-separated tag names to assign.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.yourgpt.ai/chatbot/v1/linkKnowledgebaseTags" \  -H "Content-Type: application/json" \  -d '{    "project_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",    "id": 42,    "asset_type": "url"  }'
{
  "type": "RXSUCCESS",
  "message": "Tag assigned successfully"
}
{
  "type": "RXERROR",
  "message": "Asset not found"
}
{
  "type": "RXERROR",
  "message": "Invalid or expired API token"
}