Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Getting http 400 error on incident post

I'm using node.js to post incidents to our and getting a 400 error.  Based on the API docs, which show Curl examples, I'm formatting the post data as:

var postData = querystring.stringify({

'incident[name]': "Network routing issue",

'incident[status]': "identified",

'incident[body]': "body text...",

'incident[component_ids][]': "bk60bdqdqv7g",

'incident[components][bk60bdqdqv7g]': "degraded_performance"


The raw postData result string looks like:


I'm sure that I'm not correctly translating the Curl example to javascript object.

Any pointers, examples, advice would be greatly appreciated.


2 answers

1 accepted

0 votes
Answer accepted

I've resolved this issue -- I was not sending the correct Content-Type and Content-Length headers.  With Content-Type set to "application/x-www-form-urlencoded" and Content-Length set to the post data length, I got back the expected 201 (success) status.

After a bit more reading, I've corrected one issue (the component_ids parameter), but still getting the 400 error.

The post data object is:


"incident[name]": "Network routing issue",

"incident[status]": "identified",

"incident[body]": "This is a test message body. Had this been a real incident, this would have hopefully contained some useful information.",

"incident[component_ids]": [ "bk60bdqdqv7g" ]


The post data string is:


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Statuspage

New feature: Slack notifications for Statuspage

We're excited to announce the release of a long-requested feature on Statuspage. Now visitors to your status page can subscribe to get notified in Slack when you report an incident or maintenance. Th...

3,063 views 8 20
Read article

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