# Post an internal comment using v3 API

**URL:** <https://community.developer.atlassian.com/t/post-an-internal-comment-using-v3-api/59983>\
**Category:** Jira Cloud\
**Tags:** rest-api\
**Created:** [July 19, 2022, 10:40am UTC](https://community.developer.atlassian.com/t/post-an-internal-comment-using-v3-api/59983 "2022-07-19T10:40:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![CaterinaCurti](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/caterinacurti/32/42270_2.png) [@CaterinaCurti](https://community.developer.atlassian.com/u/CaterinaCurti)\
**Post date:** [July 20, 2022, 12:12am UTC](https://community.developer.atlassian.com/t/post-an-internal-comment-using-v3-api/59983/2 "2022-07-20T00:12:18Z")

</div>

Hi @CyberlogicIntegratio and welcome to our community!

For a [**Jira Software project**](https://support.atlassian.com/jira-software-cloud/docs/what-is-a-jira-software-project/), you can add a comment with a restricted visibility using a [project role](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/).  
In this example, I’m using a role called `TestRole`:

```auto
{
  "visibility": {
    "type": "role",
    "value": "TestRole"
  },
  "body": {
    "type": "doc",
    "version": 1,
    "content": [
      {
        "type": "paragraph",
        "content": [
          {
            "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
            "type": "text"
          }
        ]
      }
    ]
  }
}

```

And the resulting comment will be restricted to that role:

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/3/1/314d8172e4a685b74d4e22de4517784fc61cd93b.png)

For a **[Jira Service project](https://support.atlassian.com/jira-service-management-cloud/docs/what-is-a-service-project/)**, you can either use the Jira platform `/rest/api/3/issue/{issueIdOrKey}/comment` end point ([link to doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post)) or the Jira service `/rest/servicedeskapi/request/{issueIdOrKey}/comment` one ([link to doc](https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-request/#api-rest-servicedeskapi-request-issueidorkey-comment-post)).  
Depending on the end point, the payload will be different.

When using the `/rest/api/3/issue/{issueIdOrKey}/comment` platform end point, the internal visibility is defined setting the `sd.public.comment` property in the payload like in this example:

```auto
{
  "body": {
    "type": "doc",
    "version": 1,
    "content": [
      {
        "type": "paragraph",
        "content": [
          {
            "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
            "type": "text"
          }
        ]
      }
    ]
  },
  "properties": [
       {
         "key": "sd.public.comment",
         "value": {
           "internal": true
         }
       }
     ]
}'

```

For the `/rest/servicedeskapi/request/{issueIdOrKey}/comment` service end point, a `public` boolean parameter is available to control the comment visibility.  
Here is an example:

```auto
{
  "public": false,
  "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper."
}

```

In both cases, this is how the comment will look like in the user interface:

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/5/c/5c8804c657dd4c825bdba5a8de36d7b595e63e9b.png)

Hope this helps,  
Caterina

---

_[View the full topic](https://community.developer.atlassian.com/t/post-an-internal-comment-using-v3-api/59983)._
