How to do an at mention when creating a note via API

Is it possible to at mention another user when creating a Note via API? If so, what’s the syntax? Thanks!

Hey @vlad.l
Welcome to the community! Yeah, you can mention other users. In the payload that you pass, the content property should have an anchor tag (<a/>) with the data-mentions attribute. This attribute should contain the user id of the person who is tagging [your_user_id] and the person who is being tagged [tagged_persons_user_id].

{
    ...,
    "content": "<a href=\"\" data-mentions='[your_user_id]:[tagged_persons_user_id]'>@taggedperson</a> hello there"
}

example:

{
    ...,
    "content": "<a href=\"\" data-mentions='123:456'>@other user</a> hello there"
}

Also, make sure you set the href path to /users/details/[tagged_user_id]

You can get the details about users from this API → Pipedrive API v1 Reference

thank you @Hem, appreciate your response! I don’t suppose there is a way to generically tag the deal owner without knowing their id, is there?

Unfortunately, no @vlad.l. You need to know their ID :slight_smile: