To use the special character you need to encode them first. As content type is HTML so we need to encode special character using HTML encoder.
To address your issue I have created user with name <alex> and added him in teams. To send the message mentioning <alex>
Please refer to below Screenshot to send Teams message mentioning <alex>.
Body Used:
{
"body": {
"contentType": "html",
"content": "<at id=\"0\"><alex></at>"
},
"mentions": [
{
"id": 0,
"mentionText": "<alex>",
"mentioned": {
"user": {
"displayName": "<alex>",
"id": "eb8f93a9-c3d6-44f8-9daf-********"
}
}
}
]
}
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.