# User mentions in Jira: [~accountid:] in wiki and ADF

URL: https://goingstellar.ro/reference/jira-formatting/user-mentions/

A mention in wiki markup is [~accountid:ID], with the Atlassian account ID of the user. ADF stores it as a mention node with the ID and the display name. A mention by old-style username does not resolve on Jira Cloud.

## Wiki markup

```
[~accountid:ACCOUNT_ID]
```

## Stored as ADF (REST API v3)

The ADF document Jira Cloud stores for `ADF:{"content": [{"content": [{"attrs": {"id": "<accountId>", "text": "@someone"}, "type": "mention"}], "type": "paragraph"}], "type": "doc", "version": 1}`:

```json
{
 "type": "doc",
 "version": 1,
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "type": "mention",
     "attrs": {
      "id": "<accountId>",
      "text": "@<display name>",
      "accessLevel": ""
     }
    }
   ]
  }
 ]
}
```

## Examples

Wiki markup (API v2):

```
[~accountid:<accountId>]
```

Mention a person by account ID and get their name as a profile link.

Rendered by Jira (HTML):

```html
<p><a href="https://your-site.atlassian.net/secure/ViewProfile.jspa?accountId=<accountId>" class="user-hover" rel="<accountId>" data-account-id="<accountId>" accountid="<accountId>" rel="noreferrer"><display name></a></p>
```

Back to wiki after the round trip:

```
[~accountid:<accountId>]
```

Sent to Jira Cloud on 29 Nov 2026.

Wiki markup (API v2):

```
Thanks [~accountid:<accountId>] for the fix
```

Mention a person inside a sentence.

Rendered by Jira (HTML):

```html
<p>Thanks <a href="https://your-site.atlassian.net/secure/ViewProfile.jspa?accountId=<accountId>" class="user-hover" rel="<accountId>" data-account-id="<accountId>" accountid="<accountId>" rel="noreferrer"><display name></a> for the fix</p>
```

Back to wiki after the round trip:

```
Thanks [~accountid:<accountId>] for the fix
```

Sent to Jira Cloud on 29 Nov 2026.

Wiki markup (API v2):

```
[~someusername]
```

Try the legacy username form that older Jira versions used.

Rendered by Jira (HTML):

```html
<p><a href="https://your-site.atlassian.net/secure/ViewProfile.jspa?accountId=someusername" rel="noreferrer">someusername</a></p>
```

Back to wiki after the round trip:

```
[~accountid:unknown]
```

Sent to Jira Cloud on 29 Nov 2026.

Wiki markup (API v2):

```
[~accountid:000000:00000000-0000-0000-0000-000000000000]
```

Mention an account ID that does not belong to any user.

Rendered by Jira (HTML):

```html
<p><a href="https://your-site.atlassian.net/secure/ViewProfile.jspa?accountId=000000%3A00000000-0000-0000-0000-000000000000" rel="noreferrer">accountid:000000:00000000-0000-0000-0000-000000000000</a></p>
```

Back to wiki after the round trip:

```
[~accountid:unknown]
```

Sent to Jira Cloud on 29 Nov 2026.

## What changes in conversion

- A valid account ID survives wiki, then ADF, then wiki unchanged. The display name in the ADF text is filled in by Jira, so the text sent in ADF (@someone) is replaced.
- An unknown account ID and the legacy username form both become a mention with the id unknown. The wiki read of that mention is [~accountid:unknown], so the original value is lost.
- The rendered HTML for a valid mention carries the user-hover class and the account ID in the data-account-id attribute.

## Pitfalls

- Use the account ID, not a username or email address. Server-era `[~username]` mentions do not resolve on Jira Cloud.
- A mention that cannot be resolved is stored with the id unknown, and the original text cannot be recovered afterwards.

## Related

- [Work item keys and smart links](https://goingstellar.ro/reference/jira-formatting/issue-links-smart-links/)
- [[mailto:] email links](https://goingstellar.ro/reference/jira-formatting/mailto-links/)
- [[alias|url] external links](https://goingstellar.ro/reference/jira-formatting/external-links/)

## Sources

- [Text Formatting Notation Help (Jira, in-product help)](https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all)
- [Atlassian Document Format: document structure (Jira Cloud platform)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)

