# Acknowledge an incident

Automatically acknowledge Better Stack incidents created in Jira by using our [Incidents API](https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/) and [Jira Automation](https://www.atlassian.com/software/jira/guides/expand-jira/automation ";_blank").

[info]
#### Did Better Stack create the work item?
Use [Better Stack for Jira](https://betterstack.com/docs/uptime/jira/better-stack-for-jira/) instead. It adds **Acknowledge**, **Resolve** and **Reopen** buttons to work items Better Stack created or linked for an incident, with no Jira Automation to set up. This guide is for incidents created from Jira.
[/info]

[warning]
#### Custom fields required in Jira
This integration requires the custom field `incident_id`. For details, see the [Create a Better Stack incident from Jira](https://betterstack.com/docs/uptime/jira/better-uptime/create/) guide.
[/warning]

## Setting up the Jira flow

1. In your Jira space, click **More actions** (…) → **Space settings** → **Automation**. To apply this to all your spaces, go to **Global administration** and create a global flow.
2. Click **Create flow**.
3. Select the **Work item transitioned** trigger.
4. For **To status**, enter `In Progress`, then click **Save**.
    ![Automation trigger configuration in Jira](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/ffde7bfa-ce88-47ef-3d59-f125a12ccd00/md2x =576x212)
    ![Automation trigger detail in Jira](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/23087013-dbe7-465a-6633-0981d6051200/lg2x =613x281)
5. Add a condition. Choose the `incident_id` field and set the condition to `is not empty`. This ensures the flow only runs for work items connected to Better Stack incidents.
6. Add an action and select **Send web request**.
    ![Add a Send web request action in Jira](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/20f3da1a-9dcf-4c58-69ff-f7760dd22800/md2x =605x210)
7. Configure the web request. Set the **Web request URL** to `https://incidents.betterstack.com/api/v2/incidents/{{incident_id}}/acknowledge`, the **HTTP method** to `POST`, and the **Web request body** to `Custom data` with the following value:

    ```json
    [label Custom data]
    {"acknowledged_by": "{{assignee.displayName}}"}
    ```

    For **Headers**, add an `Authorization` header with this value:

    ```bash
    [label Authorization header]
    Bearer $TOKEN
    ```

    ![Web request configuration in Jira](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/c7aee67c-8f60-4ecd-b532-71f186eac900/lg2x =674x818)
8. Optional: add another action to **Comment on work item**. For example: `The incident has been acknowledged by {{assignee.displayName}}.`
    ![Comment on issue action in Jira](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/bddf829a-ea83-47f7-4b2f-59ff06984200/public =591x219)

[info]
#### Don't have an API token yet?
See our guide on [obtaining an API token](https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/).
[/info]

[success]
#### That's all
From now on, when a Jira work item is moved to "In Progress", the corresponding Better Stack incident will be acknowledged.
[/success]

[info]
#### Need help with the Jira integration?
We're happy to help! Message us at hello@betterstack.com.
[/info]
