Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to send attachments to a comment through the REST API?

Hello, I am trying to send a comment through the REST API but I don't see in the documentation a valid endpoint to send an attachment to a comment, thanks

2 answers

1 accepted

1 vote
Answer accepted
Andy Heinzer Atlassian Team Jul 19, 2017

In JIRA, attachments are not bound to comments, but rather to specific issues in JIRA.  There is way add attachments in JIRA via REST, the endpoint in JIRA is /api/2/issue/{issueIdOrKey}/attachments{issueIdOrKey}/attachments-addAttachment

From the point of view of us users this is a lie.  The GUI very clearly allows the user to add an attachment via a comment.

Like # people like this

Yes! The GUI has a clear segregated way to provide attachments to a comment and that shows in the comment itself.

There are some examples of using the API here:

but maybe you can explain better what you are trying to do?

If you want an attachment to be diplayed inside a comment, you will probably have to first attach the attachment to the page (I don't think you can attach an attachment to a comment, only to its parent page), and then submit a comment with the necessary storage format (you can look at the storage format of an attachment displayed in a page to see what you need).

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you