Add an Internal or Restricted Comment With the Jira REST API or Automation
Short answer: In Jira Software and business spaces, send a visibility object with the comment: {"type": "role", "value": "<role name>"}. In Jira Service Management, Atlassian's JSM REST API takes "public": false for an internal comment. In Automation, the Comment on work item action has a Comment Visibility dropdown.
1. Restricted comment to a role (tested)
POST /rest/api/3/issue/ABC-123/comment
{
"visibility": { "type": "role", "value": "Administrators" },
"body": { "type": "doc", "version": 1, "content": [
{ "type": "paragraph", "content": [ { "type": "text", "text": "Internal: root cause found." } ] } ] }
}On our test site this returned 201 and the comment showed the lock icon. Reading it back with GET returned:
"visibility": { "type": "role", "value": "Administrators", "identifier": "Administrators" }Reference: Jira Cloud REST API: issue comments.
2. Restricted to a group, and the error you may hit first
Atlassian's REST reference documents {"type": "group", "identifier": "<group id>"} for groups (the group ID, because group names can change). On our test site the site setting Comment visibility was Space Roles only, and a group-restricted comment was refused with:
400
{"errorMessages":["GROUP_VISIBILITY_SETTING_NOT_ENABLED"],
"errors":{"commentLevel":"Group level visibility has been disabled."}}If you get this, it isn't your JSON: an admin has to set Settings > System > General configuration > Edit settings > Comment visibility to Groups & Space Roles. Until then, use a role.
3. Don't send value and identifier together
Sending both in the same visibility object (for a role or a group) returns:
400
{"errorMessages":["The body parameters 'value' and 'identifier' are mutually exclusive."],"errors":{}}
4. JSM internal notes
According to Atlassian's JSM Cloud REST reference, POST /rest/servicedeskapi/request/{issueIdOrKey}/comment takes a public boolean: true for public, false for private/internal (Jira Service Management Cloud REST API: request). We had no JSM space to test it.
POST /rest/servicedeskapi/request/ABC-123/comment
{ "public": false, "body": "Internal: root cause found." }
5. Automation: Comment Visibility and the Actor
In the flow builder (Create flow), add the action Comment on work item (it shows on the flow as Add comment to work item). It has a collapsible Comment Visibility section; the dropdown defaults to Public comment and lists roles such as Administrators (Role). The flow runs as the user in the rule details field Actor, which defaults to Automation for Jira.
Atlassian documents that restricting the comment to a role fails with an error like "You are currently not a member of the project role: Service Desk Team. (commentLevel)" when the actor isn't in that role, and its fix for JSM is to give the Automation for Jira user that role (Atlassian KB: automation errors related to project role membership). The other common route is setting Actor to a user account that is in the role. We didn't run a saved flow to test either.
6. If what you want is "every comment private by default"
Per-call visibility doesn't cover comments people type in the normal editor, and Jira has no default (JRACLOUD-9091, 991 votes on November 22, 2026). See default comment visibility.
See Private Comments Get it free on the Atlassian Marketplace
FAQ
Why does Jira return GROUP_VISIBILITY_SETTING_NOT_ENABLED? The site's Comment visibility setting is Space Roles only, so group restrictions are refused. An admin can switch it to Groups & Space Roles, or you can restrict to a role.
Should I send value or identifier? One of them, not both: Jira returns 400 'The body parameters value and identifier are mutually exclusive.' For roles, value with the role name worked in our test.
How do I add a JSM internal note with the API? Atlassian's JSM REST reference uses POST /rest/servicedeskapi/request/{issueIdOrKey}/comment with public set to false.
Can Automation post a restricted comment? Yes, with the Comment Visibility dropdown in Comment on work item, but Atlassian documents that the rule actor must be in the chosen role.
Related guides
- Restrict Comment Visibility in Jira Cloud: Group or Project Role (2026)
- Restrict comments in team-managed Jira projects
- JSM: default comments to Internal note or Reply to customer
- Jira Default Comment Visibility: Make Comments Private (Internal) by Default
- How to Add a Private (Internal) Comment in Jira Cloud
- All Jira Cloud guides
Disclosure: Loomwise makes the app mentioned in the card above and wrote this guide. Not affiliated with Atlassian. Menu labels and API responses checked on a Jira Cloud site in November 2026; statements marked as Atlassian's documentation are linked to the source and were not tested by us. Jira menus change, so verify in your site. Vote count from jira.atlassian.com, November 22, 2026. Contact: hello@loomwise.app