# Automation Settings — DayZero API

3 endpoints. OpenAPI for just this tag: https://www.ondayzero.com/docs/reference/automation-settings/openapi.json · HTML: https://www.ondayzero.com/docs/reference/automation-settings · All tags: https://www.ondayzero.com/docs/reference/index.md

## Endpoints

- `GET /api/v1/automation-settings` — Get automation settings
- `PATCH /api/v1/automation-settings` — Update automation settings
- `POST /api/v1/automation-settings/plan` — Preview an automation settings change

---

## GET /api/v1/automation-settings

> Get automation settings

- **Tag:** automation-settings
- **Operation ID:** `get_automation_settings`

### Description

Every switch that lets DayZero act without a person, grouped (categorization, payment matching, counterparties, Bill Inbox, month-end close, approvals, and the firm client digest for firm owners and admins), with what each does and whether it is active, plus plain lines for what runs unattended today.

### Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

### Responses

#### 200 — Successful Response

Schema: `SuccessEnvelope_AutomationSettingsSnapshot_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (AutomationSettingsSnapshot)

#### 401 — Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

#### 403 — Forbidden - Insufficient permissions

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

#### 422 — Validation Error

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

### Code samples

#### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/automation-settings' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

#### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/automation-settings', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

#### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/automation-settings", headers=headers)
data = response.json()
```

### See also

- HTML version: https://www.ondayzero.com/docs/reference/automation-settings/get-automation-settings
- OpenAPI slice: https://www.ondayzero.com/docs/reference/automation-settings/get-automation-settings/openapi.json
- Other endpoints in **automation-settings**: https://www.ondayzero.com/docs/reference/automation-settings (markdown bundle: https://www.ondayzero.com/docs/reference/automation-settings.md, OpenAPI: https://www.ondayzero.com/docs/reference/automation-settings/openapi.json)
- Endpoint catalog: https://www.ondayzero.com/docs/reference/index.md

---

## PATCH /api/v1/automation-settings

> Update automation settings

- **Tag:** automation-settings
- **Operation ID:** `update_automation_settings`

### Description

Applies a change to the automation switches. Owner or admin only; the firm client digest switches need an owner or admin of the business's advisory firm. Callers should preview with ``/plan`` and confirm the widening changes with the person first. A refused key fails the whole request (400) and nothing is saved.

### Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

### Request body

Schema: `AutomationSettingsChangeRequest`

- `settings` (object · required)

### Example request

```json
{
  "settings": {
    "inbox_auto_post_enabled": true,
    "inbox_auto_post_max_amount_cents": 50000
  }
}
```

### Responses

#### 200 — Successful Response

Schema: `SuccessEnvelope_AutomationSettingsApplyResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (AutomationSettingsApplyResponse)

#### 400 — Bad Request - Invalid input

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

#### 401 — Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

#### 403 — Forbidden - Insufficient permissions

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

#### 422 — Validation Error - Request body or parameters failed validation

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

### Code samples

#### cURL

```bash
curl -X PATCH 'https://api.ondayzero.com/api/v1/automation-settings' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "settings": {
    "inbox_auto_post_enabled": true,
    "inbox_auto_post_max_amount_cents": 50000
  }
}'
```

#### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/automation-settings', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "settings": {
    "inbox_auto_post_enabled": true,
    "inbox_auto_post_max_amount_cents": 50000
  }
}),
});
const data = await response.json();
```

#### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {'settings': {'inbox_auto_post_enabled': True,
              'inbox_auto_post_max_amount_cents': 50000}}

response = httpx.patch("https://api.ondayzero.com/api/v1/automation-settings", headers=headers, json=payload)
data = response.json()
```

### See also

- HTML version: https://www.ondayzero.com/docs/reference/automation-settings/update-automation-settings
- OpenAPI slice: https://www.ondayzero.com/docs/reference/automation-settings/update-automation-settings/openapi.json
- Other endpoints in **automation-settings**: https://www.ondayzero.com/docs/reference/automation-settings (markdown bundle: https://www.ondayzero.com/docs/reference/automation-settings.md, OpenAPI: https://www.ondayzero.com/docs/reference/automation-settings/openapi.json)
- Endpoint catalog: https://www.ondayzero.com/docs/reference/index.md

---

## POST /api/v1/automation-settings/plan

> Preview an automation settings change

- **Tag:** automation-settings
- **Operation ID:** `plan_automation_settings`

### Description

Validates a change and lists what it would do without saving. ``widening`` names the changes that give the automation more room (turning one on, lowering a confidence line, raising or removing a cap, dropping a review step); ``errors`` maps refused keys to why.

### Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

### Request body

Schema: `AutomationSettingsChangeRequest`

- `settings` (object · required)

### Example request

```json
{
  "settings": {
    "inbox_auto_post_enabled": true,
    "inbox_auto_post_max_amount_cents": 50000
  }
}
```

### Responses

#### 200 — Successful Response

Schema: `SuccessEnvelope_AutomationSettingsPlan_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (AutomationSettingsPlan)

#### 401 — Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

#### 403 — Forbidden - Insufficient permissions

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

#### 422 — Validation Error - Request body or parameters failed validation

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

### Code samples

#### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/automation-settings/plan' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "settings": {
    "inbox_auto_post_enabled": true,
    "inbox_auto_post_max_amount_cents": 50000
  }
}'
```

#### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/automation-settings/plan', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "settings": {
    "inbox_auto_post_enabled": true,
    "inbox_auto_post_max_amount_cents": 50000
  }
}),
});
const data = await response.json();
```

#### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {'settings': {'inbox_auto_post_enabled': True,
              'inbox_auto_post_max_amount_cents': 50000}}

response = httpx.post("https://api.ondayzero.com/api/v1/automation-settings/plan", headers=headers, json=payload)
data = response.json()
```

### See also

- HTML version: https://www.ondayzero.com/docs/reference/automation-settings/plan-automation-settings
- OpenAPI slice: https://www.ondayzero.com/docs/reference/automation-settings/plan-automation-settings/openapi.json
- Other endpoints in **automation-settings**: https://www.ondayzero.com/docs/reference/automation-settings (markdown bundle: https://www.ondayzero.com/docs/reference/automation-settings.md, OpenAPI: https://www.ondayzero.com/docs/reference/automation-settings/openapi.json)
- Endpoint catalog: https://www.ondayzero.com/docs/reference/index.md
