# Cambiar la configuración de alertas y del cierre de mes

`PUT /api/v1/dte/tools/settings/` · Herramientas de gestión · Fuente: https://api.sharkpos.cl/docs/api/update-tool-settings/

Envía cualquiera de los cuatro campos; los demás conservan su valor. Un correo vacío o null lo quita.

## Cuerpo de la solicitud (ToolSettings)

| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| `alerts_email` | string o null (email) |  |  |
| `monthly_close_email` | string o null (email) |  | Si falta, el cierre va a alerts_email. |
| `alerts_enabled` | boolean (por defecto True) |  |  |
| `monthly_close_enabled` | boolean (por defecto False) |  |  |

## Ejemplo en el sandbox

```bash
curl -X PUT https://sandbox.sharkpos.cl/api/v1/dte/tools/settings/ \
  -H "Authorization: Bearer $SHARKPOS_API_KEY"
```

## Respuestas

| HTTP | Qué significa | Esquema |
|---|---|---|
| 200 | Configuración guardada. |  |
| 400 | Solicitud inválida (`INVALID_REQUEST`, `INVALID_RECEPTOR_RUT`, `CONSUMIDOR_FINAL_NOT_ALLOWED`, `IDEMPOTENCY_KEY_REQUIRED`, `CAF_NOT_FOUND`...). | Error |
| 401 | Credencial ausente o inválida (`AUTHENTICATION_REQUIRED`, `INVALID_API_KEY`). | Error |
| 403 | Acceso no habilitado (`API_KEY_EXPIRED`, `API_ACCESS_DISABLED`, `EMISSION_NOT_CONTRACTED`, `PARTNER_ACCESS_DISABLED`, `PLAN_NOT_INCLUDED`, `READ_ONLY_KEY`, `OFFLINE_NOT_CONTRACTED` con `solution`, `TENANT_SUSPENDED_BY_PARTNER` con `solution`, `OFFLINE_MANAGED_BY_BILLING`, `DEVICE_RETIRED`). Una suscripción vencida responde 402 `SUBSCRIPTION_EXPIRED` (o `SANDBOX_TRIAL_EXPIRED` en el sandbox de prueba). | Error |

Contrato completo: https://api.sharkpos.cl/docs/openapi.yaml
