Skip to main content
POST
/
v1.0
/
agent
/
{agentId}
/
tag
/
add
Add tags to an agent
curl --request POST \
  --url https://api.lofty.com/v1.0/agent/{agentId}/tag/add \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "tagNames": [
    "VIP",
    "Premium"
  ],
  "autoCreate": true
}
'
{
  "data": true,
  "errorCode": 0,
  "errorMsg": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://developer.lofty.com/llms.txt

Use this file to discover all available pages before exploring further.

Headers

Authorization
string
required

Bearer [access_token]

Content-Type
string
required

application/json

Path Parameters

agentId
integer<int64>
required

User ID of the agent to tag.

Required range: x >= 1

Body

application/json

Tag batch payload.

tagNames
string[]

Tag names to add to the agent. Up to 20 per call.

Example:
["VIP", "Premium"]
autoCreate
boolean
default:false

When true, tag names that do not yet exist on the team are created automatically. When false, unknown tag names cause the call to fail.

Example:

true

Response

Envelope indicating whether the batch add succeeded.

Response for POST /v1.0/agent/{agentId}/tag/add. Envelope that carries the batch result and an error code when the operation fails.

data
boolean

Whether all requested tags were added successfully.

Example:

true

errorCode
integer<int32>

Business error code. 0 indicates success.

Example:

0

errorMsg
string

Human-readable error message when errorCode != 0.