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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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

How to tell from webhook if it is a new incident?


As the title suggests, I've been playing around with webhooks and would like to take action on them. My issue is, there is no flag/field that denotes that this is a new incident being created for the first time.


1) That would be a great feature to have added

2) Are there any suggestions on using the webhook and knowing if it's the first time an incident is being created?

1 answer

0 votes
Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 24, 2023

Hey @Jordan Violet Happy to help :)

You should be able to use the Statuspage API to fetch incident details and determine if an incident is new or not.
When you receive a webhook, you can use the incident ID from the webhook payload to fetch incident details using the API.

I would say this is a suggestion, as we don't have a code, and this is done on your side.
Here's how you should be able to do it:

1. Make an API call to the following endpoint to get incident details:

Replace `:page_id` with your Statuspage page ID and `:incident_id` with the incident ID from the webhook payload.

2. Check the `created_at` and `updated_at` fields in the API response, just like in the webhook payload approach.

Here's a Python example using the `requests` library:

import requests
import datetime

page_id = "your_page_id"
incident_id = "incident_id_from_webhook"
api_key = "your_api_key"

url = f"{page_id}/incidents/{incident_id}"
headers = {"Authorization": f"OAuth {api_key}"}

response = requests.get(url, headers=headers)
incident_data = response.json()

created_at = datetime.datetime.strptime(incident_data['created_at'],

updated_at = datetime.datetime.strptime(incident_data['updated_at'], '%Y-%m-%dT%H:%M:%SZ')

if (updated_at - created_at).total_seconds() < 5: # Considering a 5-second difference
print("New incident")
print("Existing incident")

Replace `your_page_id`, `incident_id_from_webhook`, and `your_api_key` with the appropriate values.

This approach should give you more control over the incident data and allow you to access additional information that might not be available in the webhook payload.
However, it requires an additional API call, which might increase processing time and consume API rate limits.
If the webhook payload provides enough information to determine if an incident is new or not, using the API might not be necessary.

In case you have further question or if you need further troubleshooting, I would recommend you open a formal ticket with our support here, Jordan. 😄 


Hey Rafa,


Great writeup and I appreciate the well-thought answer. The issue with this solution and having to make an additional API call though is that turns this into polling and really defeats the value of a webhook.


It would make much more sense that the webhook simply had an additional boolean/string value indicating if this was a new incident or an incident update, especially considering the implementation behind the webhook likely already has this information. Where could one submit a feature request for a simple addition like this?

Like Rafael Meira likes this
Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 24, 2023

Thank you for the suggestion @Jordan Violet 

I have created the Feature Request, you won't be able to open it, since it is internal, but you can have the reference name:  STATUS-576.

I have attached this community question to it, and we will let you know of any progress.

I really appreciate it.

If you have any further questions, let me know.


Like Jordan Violet likes this

Thanks, Rafael!

Like Rafael Meira likes this
Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 24, 2023

You're welcome!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events