Skip to main content
POST
/
api
/
tags
/
add
Add a tag
curl --request POST \
  --url http://localhost:8080/api/tags/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "bot_id": 1,
  "chat_id": -100123456789,
  "user_id": 987654321,
  "username": "alice",
  "tag": "VIP",
  "color": "#FFD700"
}
'
{
  "id": 123,
  "chat_id": 123,
  "user_id": 123,
  "username": "<string>",
  "tag": "<string>",
  "color": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key with bmx_ prefix. Obtain via /api/auth/api-keys.

Body

application/json
chat_id
integer
required

Chat to tag user in

user_id
integer
required

User to tag

tag
string
required

Tag label

bot_id
integer

Bot ID (for permission check)

username
string

Username at time of tagging

color
string

Tag color

Response

Tag created

id
integer

Tag record ID

chat_id
integer

Chat this tag belongs to

user_id
integer

User this tag is assigned to

username
string

Username at time of tagging

tag
string

Tag label text

color
string

Tag color (hex or CSS color name)

created_at
string<date-time>

When the tag was created