# Commented is not posted in issue using request api

**URL:** <https://community.developer.atlassian.com/t/commented-is-not-posted-in-issue-using-request-api/82848>\
**Category:** Forge\
**Tags:** atlassian-document-format, comment, rest-api\
**Created:** [August 22, 2024, 1:15pm UTC](https://community.developer.atlassian.com/t/commented-is-not-posted-in-issue-using-request-api/82848 "2024-08-22T13:15:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhurgeswari](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@Dhurgeswari](https://community.developer.atlassian.com/u/Dhurgeswari)\
**Post date:** [August 22, 2024, 1:15pm UTC](https://community.developer.atlassian.com/t/commented-is-not-posted-in-issue-using-request-api/82848/1 "2024-08-22T13:15:37Z")

</div>

I am trying to update comment in my created issue. here i am facing 400 issue.  
**response:**

```plaintext
ERROR 2024-08-22T12:59:24.513Z c507f70b-94d8-4bed-b9ae-d926d66cd1a7 Failed to add comment, status code: 400 response: {"errorMessages":[],"errors":{"comment":"Comment body can not be empty!"}}.

```

can you share your thoughts if anything i have mentioned wrong or missed anything  
**here is my sample request**

```javascript
 try {
    const response = await api.asApp().requestJira(route`/rest/api/3/issue/${event.issue.id}/comment`, {
      method: 'POST',
      body: JSON.stringify({
        comment:{
        body: "test comment"
      }}),
      headers: {
        'Content-Type': 'application/json'
      }
    });
  
    const responseBody = await response.text(); // Get raw text of response body
    console.log('Raw response body:', responseBody);
  
    if (response.ok) {
      const data = JSON.parse(responseBody);
      console.log('Comment successfully added:', data);
    } else {
      console.error('Failed to add comment, status code:', response.status, 'response:', responseBody);
    }
  } catch (error) {
    console.error('Error adding comment:', error);
  }

```

---

<div class="post-metadata">

**Author:** ![anon96974232](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@anon96974232](https://community.developer.atlassian.com/u/anon96974232)\
**Post date:** [August 22, 2024, 9:58pm UTC](https://community.developer.atlassian.com/t/commented-is-not-posted-in-issue-using-request-api/82848/2 "2024-08-22T21:58:05Z")

</div>

Hello @Dhurgeswari

You must format the **body** parameter of the comment using ADF, as shown in the example in the [Add Comment](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post) endpoint’s documentation.

---

<div class="post-metadata">

**Author:** ![Dhurgeswari](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@Dhurgeswari](https://community.developer.atlassian.com/u/Dhurgeswari)\
**Post date:** [August 23, 2024, 4:13am UTC](https://community.developer.atlassian.com/t/commented-is-not-posted-in-issue-using-request-api/82848/3 "2024-08-23T04:13:25Z")

</div>

Thanks @sunnyape.its working now 🙂
