---
title: "Update automation settings"
description: "Change what the store automates: automatic invoice emails and their condition (any order, a payment, fulfillment or shipment status, narrowed by customer and order tags and by sales channel), automatic credit notes on re"
url: https://docs.invoicefalcon.com/v3-reference/account/update-automation-settings/
api: "API v3 reference"
method: PATCH
path: "/account/automation"
---

# Update automation settings

`PATCH https://app.invoicefalcon.com/api/v3/external/account/automation`

Change what the store automates: automatic invoice emails and their condition (any order, a payment, fulfillment or shipment status, narrowed by customer and order tags and by sales channel), automatic credit notes on refunds, the Pay now button, and payment reminders. Deep partial. Returns the automation section as the read shows it.

**Note:** Applies to orders and invoices from now on; nothing is sent for past orders. Tag and status conditions, automatic reminders, automatic credit notes and the Pay now button need a paid plan.

## Request body

- `automatic_invoices` (object)
  - `enabled` (boolean): Email an invoice for every order that meets the condition.
  - `delay_minutes` (integer, nullable): Wait this long after the order before sending (1-30); null sends at once.
  - `when` (object)
    - `trigger` (string): Which condition applies. `any_order` clears the three statuses; the others need the matching status set. One of: `any_order`, `payment_status`, `fulfillment_status`, `shipment_status`.
    - `payment_status` (string, nullable): Send when the order reaches this payment status. Clears the other two. One of: `paid`, `pending`, `refunded`, `partially_paid`, `authorized`, `voided`.
    - `fulfillment_status` (string, nullable): Send when the order reaches this fulfillment status. Clears the other two. One of: `shipped`, `unshipped`, `partial`, `in_progress`, `on_hold`.
    - `shipment_status` (string, nullable): Send when the shipment reaches this status. Clears the other two. One of: `shipped`, `delivered`, `in_transit`.
  - `only_customer_tags` (string, nullable): Only customers with one of these tags (comma-separated).
  - `except_customer_tags` (string, nullable): Never for customers with one of these tags.
  - `only_order_tags` (string, nullable): Only orders with one of these tags.
  - `except_order_tags` (string, nullable): Never for orders with one of these tags.
  - `only_sales_channels` (string, nullable): Only orders from these sales channels (comma-separated Shopify source names such as web, pos, amazon); blank means any.
- `automatic_credit_notes` (object)
  - `enabled` (boolean): Create a credit note when Shopify records a refund.
  - `email_customer` (boolean): Also email the credit note to the customer.
- `pay_now_button` (object)
  - `enabled` (boolean): Show a Pay now button in invoice emails for unpaid orders.
- `payment_reminders` (object)
  - `enabled` (boolean): Payment reminders are available for unpaid invoices.
  - `automatic` (boolean): Send reminders automatically instead of by hand.
  - `due_after_days` (integer, nullable): Days after the invoice date an invoice is due.
  - `every_days` (integer): Days between reminders (at least 1).
  - `send` (string): Before the due date, after it, or both. One of: `after`, `before`, `both`.
  - `also_send_to` (string, nullable): Extra recipients, comma-separated.
  - `only_to_these_addresses` (boolean): Send reminders only to `also_send_to`, not the customer.
  - `include_payment_link` (boolean): Put the payment link in reminder emails.

## Returns

- `automatic_invoices` (object)
  - `enabled` (boolean): e.g. `true`
  - `delay_minutes` (integer, nullable): e.g. `5`
  - `when` (object)
    - `payment_status` (string): e.g. `paid`
    - `fulfillment_status` (string, nullable)
    - `shipment_status` (string, nullable)
    - `trigger` (string): e.g. `payment_status`
  - `only_customer_tags` (string, nullable)
  - `except_customer_tags` (string, nullable)
  - `only_order_tags` (string, nullable)
  - `except_order_tags` (string, nullable)
- `automatic_credit_notes` (object)
  - `enabled` (boolean): e.g. `false`
  - `email_customer` (boolean): e.g. `false`
- `pay_now_button` (object)
  - `enabled` (boolean): e.g. `false`
- `payment_reminders` (object)
  - `enabled` (boolean): e.g. `true`
  - `automatic` (boolean): e.g. `false`
  - `due_after_days` (integer, nullable)
  - `every_days` (integer): e.g. `5`
  - `send` (string): e.g. `after`
  - `also_send_to` (string)
  - `only_to_these_addresses` (boolean): e.g. `false`
  - `include_payment_link` (boolean): e.g. `false`
  - `active` (boolean): e.g. `false`
  - `also_send_to_addresses` (array of anys)
- `paid_features_available` (boolean): e.g. `true`

Rate limit: this call costs 2 points ([rate limits](https://docs.invoicefalcon.com/v3/docs/api-v3/rate-limits/)).

## Example request

```sh
curl -X PATCH "https://app.invoicefalcon.com/api/v3/external/account/automation" \
  -H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "automatic_invoices": {
      "enabled": true,
      "delay_minutes": 5,
      "when": {
        "trigger": "payment_status",
        "payment_status": "paid"
      }
    }
  }'
```

## 200

The updated resource.

```json
{
  "automatic_invoices": {
    "enabled": true,
    "delay_minutes": 5,
    "when": {
      "payment_status": "paid",
      "fulfillment_status": null,
      "shipment_status": null,
      "trigger": "payment_status"
    },
    "only_customer_tags": null,
    "except_customer_tags": null,
    "only_order_tags": null,
    "except_order_tags": null
  },
  "automatic_credit_notes": {
    "enabled": false,
    "email_customer": false
  },
  "pay_now_button": {
    "enabled": false
  },
  "payment_reminders": {
    "enabled": true,
    "automatic": false,
    "due_after_days": null,
    "every_days": 5,
    "send": "after",
    "also_send_to": "",
    "only_to_these_addresses": false,
    "include_payment_link": false,
    "active": false,
    "also_send_to_addresses": []
  },
  "paid_features_available": true
}
```

## 401

Missing or unknown `X-Auth-Token`, or the shop uninstalled the app.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "unauthorized"
}
```

## 403

`v3_required`: the shop still runs the previous dashboard. `paid_plan_required`: API access needs a paid plan.

```json
{
  "errors": [
    "API access requires a paid plan"
  ],
  "code": "paid_plan_required"
}
```

## 422

The request failed validation. Nothing was saved.

```json
{
  "errors": [
    "id is missing"
  ]
}
```

## 429

Rate limited: cost-weighted per key (reads cost less than writes). Wait `Retry-After` seconds; see `X-RateLimit-*` headers.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited"
}
```

