# Alerts API for organisations

### Capabilities

ChargebackStop REST API for organisations allows:

* Listing all alerts in the organisation
* Getting individual alert by its unique ID
* Actioning an alert

The API uses JSON both as an input and output data format.

### Actioning alerts

Every alert with `ACTION_REQUIRED` status is expected to be actioned by the user. The deadline for actioning an alert is represented by the `action_required_deadline` field in the alert object, however we recommend sending your desired action as soon as possible. After actioning, the alert status is moved into `RESOLVED`, and cannot be changed anymore.

Behind the scenes, actioning the alert updates the alert provider (e.g. Ethoca) with the outcome. This allows them to stop the dispute if the user's action was to pro-actively refund the transaction, or send the dispute through if you chose to fight it.

For actions that refund the transaction, if your ChargebackStop merchant account is integrated with a payments provider (e.g. Stripe), we will automatically refund the payment. You can also choose to cancel the subscription associated with the payment

The update alert endpoint takes `action` parameter. It can be one of four values:

* `REFUND`
* `CANCEL`
* `REFUND_AND_CANCEL`
* `ACCEPT_DISPUTE`

Let's explore how each of these values works.

#### REFUND

All of the below actions are performed:

1. We let the alert provider know that you refunded the alert.
2. If your Merchant account is integrated with a payment provider, we will automatically refund the payment.

#### CANCEL

All of the below actions are performed:

1. We let the alert provider know that you did not refund the alert.
2. If your Merchant account is integrated with a payment provider and there's a subscription associated with the alert, we will automatically cancel it.

#### REFUND AND CANCEL

All of the below actions are performed:

1. We let the alert provider know that you refunded the alert.
2. If your Merchant account is integrated with a payment provider, we will automatically refund the payment.
3. If your Merchant account is integrated with a payment provider and there's a subscription associated with the alert, we will automatically cancel it.

#### ACCEPT\_DISPUTE

All of the below actions are performed:

1. We let the alert provider know that you did not refund the alert.

### API keys

In order to create an organisation-level API key:

1. Open your ChargebackStop dashboard
2. Select "Settings" from the left-hand menu
3. Select "API Keys" from the tabs at the top\
   \
   ![](/files/RQA6J0s35J9dbHse3Aow)<br>
4. Click the "Create API key" button
   1. In the newly opened form enter your key's name. It's only used for your reference.
   2. Add expiration date if you want the key to stop working at some point in the future. If you want to use the key indefinitely, please leave this field empty.
5. Click "Create key"
6. You will see your API key in the green success box right under the tabs. You will only be able to see it once, so make sure to copy it (including the `cbs_`prefix) and save it securely. If you loose your key, you will need to revoke it and create a new one.\
   ![](/files/yc7sT0uCMyzhZ5DCla9F)<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chargebackstop.com/developer/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
