> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an alert source

> Change the name, state, escalation policy, default severity, extra labels and receiving cluster of an alert source.

```http theme={null}
PUT /api/v1/alerts/sources/{id}
```

Writes back the settings of an [alert source](https://docs.molesignal.com/en-US/alerting/sources.md) as a whole. It requires `alerts.sources.manage`. The fields are those of [Create an alert source](https://docs.molesignal.com/en-US/api/alerting/create-source.md); the kind cannot change, so a `kind` given must be the current one. The token stays; [Rotate a token](https://docs.molesignal.com/en-US/api/alerting/rotate-source-token.md) changes it. Without `home_cluster`, the receiving cluster stays. Incidents already open keep their escalation policy and labels.

```bash cURL theme={null}
curl -X PUT http://localhost:5080/api/v1/alerts/sources/$SOURCE_ID \
  -H "authorization: Bearer $MS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"name": "Production Prometheus", "enabled": false, "escalation_policy_id": "default", "severity": "error"}'
```

The response is the updated source, without a `token`.

**Errors**

| Status | Cause |
| - | - |
| `400` | A field is wrong, or the kind changed. |
| `403` | The token lacks `alerts.sources.manage`. |
| `404` | The source does not exist. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.