Format text and use emoji in Comments

You can create and update comments using text formatting and emoji.

Plain text

You can also use "comment_text": "This is a comment" if you are simply adding a plain text comment, as shown in the example below.

Copy
Copied
{
  "comment": [
    {
      "text": "plain text",
      "attributes": {}
    }
  ]
}

Bold text

Use bold text.

Copy
Copied
{
  "comment": [
    {
    "text": "bold text",
    "attributes": {
      "bold": true
      }
    }
  ]
}

Italicized text

Use text with italics.

Copy
Copied
{
  "comment": [
    {
    "text": "italics",
    "attributes": {
      "italic": true
      }
    }
  ]
}

Inline code

Use inline code formatting.

Copy
Copied
{
  "comment": [
  {
    "text": "inline code",
    "attributes": {
      "code": true
      }
    }
  ]
}

Code block

Create a code block.

Copy
Copied
{
  "comment": [
    {
    "text": "code block",
    "attributes": {}
    },
    {
    "text": "\n",
    "attributes": 
      {
      "code-block": {
        "code-block": "plain"
        }
      }
    }
  ]
}

Bulleted list

Create an unordered list.

Copy
Copied
{
  "comment": [
    {
    "text": "bulleted list",
    "attributes": {}
    },
    {
    "text":"\n",
    "attributes":
      {
      "list": {
        "list": "bullet"
        }
      }
    }
  ]
}

Numbered list

Create an ordered list.

Copy
Copied
{
"comment": [
  {
  "text": "numbered list",
  "attributes": {}
  },
    {
    "text":"\n",
    "attributes":
      {
      "list": {
        "list": "ordered"
        }
      }
    }
  ]
}

Checklist

Create a checklist with checked and unchecked items.

Copy
Copied
{
  "comment": [
    {
    "text": "Checklist",
    "attributes": {}
    },
    {
    "text": "\n",
    "attributes": {
      "list": {
        "list": "unchecked"
        }
      }
    },
    {
    "text": "Checked item",
    "attributes": {}
    },
    {
    "text": "\n",
    "attributes": {
      "list": {
        "list": "checked"
        }
      }
    }
  ]
}

Emoji

The code property must be a valid Unicode emoji value, often written like U+1f60a. Please omit the U+ and only pass the hex value of the code as a string.

Copy
Copied
{
  "comment": 
  [
    {
    "text": "U0001F60A",
    "type": "emoticon",
    "emoticon":
      {
      "code": "1f60a"
      }
    }
  ]
}

Tag people in task comments

You can tag people in task comments (also known as @mentions) by including a tag with the person's ClickUp user ID. You can include more than one tag per request, and add text before and after the tag.

Tip

You can use the Get Authorized Teams endpoint to find the user ID of the person you want to tag.

Copy
Copied
{
    "comment": [
        {
        "text": "I need someone to look at this comment. Maybe "
        },
        {
        "type": "tag",
        "user": {
            "id": 1234567
            }
        },
        {
        "text": " if you have time to check this out. Thanks!"
        }
    ]
}

Add hyperlinks to task comments

You can add hyperlinks to comments.

Copy
Copied
{ 
      "comment":[
      {
      "text": "Task comment content",
      "attributes": {
      "link":"https://clickup.com/api"}
        } 
     ]
}