Identify if an issue is an Epic or not


I am using the rest api and using webhooks to catch updates in issues.
I need to know when an issue is an epic.
Is it safe to assume that epics always have an issuetype with id 10004 (this is id of the epic issuetype for any test I have performed up to now.

The other way I have found is to call the Jira software API and try to fetch the /epic/id endpoint to see if it returns data, which means it is an epic. But in order to avoid this extra step, I wanted to ask if Epics always have an issue type with id 10004 or not.

Thank you

Just use the following condition on the Webhook:

issuetype = Epic

Just for information, all Epics will have the same Issue Type ID (10004) on your system, but not neccessarily others’ systems.

Thank you !
Good suggestion !