Skip to content

setChatAdministratorCustomTitle

Set a custom title for an administrator in the chat.

Request

POST /:token/setchatadministratorcustomtitle

Parameters

ParameterTypeRequiredDescription
chat_idInteger/StringYesUnique identifier or username of the target chat
user_idIntegerYesUnique identifier of the target administrator user
custom_titleStringYesCustom title for the administrator, 0-16 characters. Set to an empty string to clear the custom title

Response

Returns Boolean true on success.

json
{
  "ok": true,
  "result": true
}

Error Codes

CodeDescription
400Bad request parameters, such as custom_title exceeding 16 characters or the target user is not an administrator
401Invalid or expired token
403Bot does not have sufficient administrator privileges to perform this action
404Chat or user not found
500Internal server error

Example

cURL

Set a custom title

bash
curl -X POST "https://api.example.com/<token>/setchatadministratorcustomtitle" \
  -H "Content-Type: application/json" \
  -d '{
    "chat_id": -1001234567890,
    "user_id": 987654321,
    "custom_title": "Tech Lead"
  }'

Clear a custom title

bash
curl -X POST "https://api.example.com/<token>/setchatadministratorcustomtitle" \
  -H "Content-Type: application/json" \
  -d '{
    "chat_id": -1001234567890,
    "user_id": 987654321,
    "custom_title": ""
  }'