> For the complete documentation index, see [llms.txt](https://docs.cstplus.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cstplus.org/api-reference/general/eas.md).

# EAS

Control the Emergency Alert System programmatically. Useful for integrating with external alert dispatch systems or running scheduled drills.

{% hint style="warning" %}
EAS endpoints require the `eas:trigger` scope and a **Pro or Business** plan.
{% endhint %}

***

## Activate emergency alert

<mark style="color:green;">`POST`</mark> `http://YOUR_SERVER:8080/api/eas/trigger`

Activates EAS immediately. All channels in scope (as configured in Settings > EAS) switch to the alert feed within 2-6 seconds.

If EAS is already active, this call is a no-op and returns 200.

#### Headers

| Name                                            | Type   | Description                                    |
| ----------------------------------------------- | ------ | ---------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer YOUR\_API\_KEY (requires `eas:trigger`) |

#### Request Body

| Name    | Type   | Description                                                          |
| ------- | ------ | -------------------------------------------------------------------- |
| message | string | Optional message logged with this trigger event (for audit purposes) |

{% tabs %}
{% tab title="200: OK EAS activated" %}

```json
{
  "active": true,
  "activatedAt": "2026-06-25T14:30:00Z",
  "channelsAffected": ["news", "sport-1", "kids"]
}
```

{% endtab %}

{% tab title="403: Forbidden Insufficient scope or wrong plan" %}

```json
{ "error": "unauthorized", "message": "eas:trigger scope required" }
```

{% endtab %}

{% tab title="503: Service Unavailable EAS not configured or readiness check failed" %}

```json
{ "error": "eas_not_ready", "message": "No alert content configured. Set up EAS in Settings first." }
```

{% endtab %}
{% endtabs %}

***

### Cancel EAS

## Cancel emergency alert

<mark style="color:green;">`POST`</mark> `http://YOUR_SERVER:8080/api/eas/cancel`

Cancels an active EAS. All affected channels switch back to their normal streams within 2-6 seconds.

If EAS is not active, this call is a no-op and returns 200.

#### Headers

| Name                                            | Type   | Description                                    |
| ----------------------------------------------- | ------ | ---------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer YOUR\_API\_KEY (requires `eas:trigger`) |

{% tabs %}
{% tab title="200: OK EAS cancelled" %}

```json
{
  "active": false,
  "cancelledAt": "2026-06-25T14:45:00Z"
}
```

{% endtab %}
{% endtabs %}

***

### Get EAS status

## Get current EAS state

<mark style="color:blue;">`GET`</mark> `http://YOUR_SERVER:8080/api/eas/status`

Returns whether EAS is currently active and, if so, when it was triggered and which channels are affected.

#### Headers

| Name                                            | Type   | Description                                    |
| ----------------------------------------------- | ------ | ---------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer YOUR\_API\_KEY (requires `eas:trigger`) |

{% tabs %}
{% tab title="200: OK EAS inactive" %}

```json
{
  "active": false
}
```

{% endtab %}

{% tab title="200: OK EAS active" %}

```json
{
  "active": true,
  "activatedAt": "2026-06-25T14:30:00Z",
  "triggeredBy": "api",
  "channelsAffected": ["news", "sport-1"]
}
```

{% endtab %}
{% endtabs %}

***

### Integration example

Trigger EAS from a shell script or external monitoring system:

{% tabs %}
{% tab title="curl" %}

```bash
curl -s -X POST http://YOUR_SERVER:8080/api/eas/trigger \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Triggered by monitoring system"}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

resp = requests.post(
    "http://YOUR_SERVER:8080/api/eas/trigger",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"message": "Triggered by monitoring system"}
)
print(resp.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const res = await fetch("http://YOUR_SERVER:8080/api/eas/trigger", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ message: "Triggered by monitoring system" }),
});
console.log(await res.json());
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cstplus.org/api-reference/general/eas.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
