Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Jira API to tag user in Comment

I am able to add comment to issue in Jira through API  but i am struggling to mention/tag user in that comment i am using below API 

curl -D- -u admin:adminxyz-X POST --data '{"body": {"type": "mention","attrs": { "id": "xyz","text": "hi @XYZ "}}}' -H "Content-type: application/json"


i am getting below error 


{"errorMessages":["Can not deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@6851c17a; line: 1, column: 2] (through reference chain:[\"body\"])"]}+


2 answers

Just to clarify, in practive it looks like: [~accountid:5c6b8ee0e1bcdf6294d08676]. Spend some time to figure the final state

0 votes
skavatekar Atlassian Team Aug 19, 2021

Hey Pravin,

Check this one,

curl D -u username:password -X POST --data '{"type":"mention","body":"hi [~user]"}' -H "Content-Type: application/json" http://myjira:8080/rest/api/2/issue/COM-1/comment


Hi Sunil, I am getting the below result when using "hi [~pamishra]"  (where "pamishra" is a valid user name) to tag a user in the comment, this "User" when clicked takes me to a page saying the user does not exist.Screenshot 2021-09-24 at 3.21.07 PM.png

Like Lorna Jones likes this

I also need an answer for this issue

skavatekar Atlassian Team Jan 07, 2022

Make sure you have a valid user. This works and has been tested.

Hi @Lorna Jones , found a way through this, after recent updates [~<username>] does not work in order to tag a user in JIRA comment.

Try [~accountid:{<accountid>}]. 
This worked for me.

Like # people like this

thanks for replying, that is the work-around I came to the conclusion of as well! :)  - I do wish this was documented a bit better, rather than letting users stumble through forums for useful comments!

[~accountid:{<accountid>}] does work, is there any official documentation about this?

It's not work

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events