---
title: "Upsert Recurring Preference"
method: POST
path: "/api/bills/recurring-preferences"
tags: ["Bills"]
---

# Upsert Recurring Preference

`POST /api/bills/recurring-preferences`

## Request

- Base URL: `https://api.earmarkiq.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.earmarkiq.app/api/bills/recurring-preferences`
- Auth: HTTP bearer

Create or update a recurring preference (upsert by merchant_name).

Stage A rule 4: this is the ONE write behind every user edit — "not a
bill" (override_type=not_recurring), an amount/frequency edit
(bill|subscription + amount/frequency), a manual add (source=manual)
and a section move. A real SQL upsert keyed by user + merchant, so the
mobile outbox can replay it after being offline; every call also
records a recurring_review_events row (once per client_id) and re-runs
the analysis so /latest, Home, Payday and budget onboarding reflect the
edit now rather than after the next bank sync.

## Request body

- RecurringPreferenceRequest
  - `merchant_name` string, required
  - `override_type` 'bill' | 'subscription' | 'habit' | 'not_recurring', required
  - `amount` number, nullable
  - `frequency` string, nullable
  - `source` string
  - `display_name` string, nullable
  - `client_id` string, nullable
  - `surface` string, nullable

## Response `200`

Successful Response

- RecurringPreferenceResponse
  - `id` string, required
  - `merchant_name` string, required
  - `override_type` string, required
  - `created_at` string, required
  - `updated_at` string, required
  - `amount` number, nullable
  - `frequency` string, nullable
  - `source` string
  - `display_name` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/earmarkiq/apis/earmark-api.md) · [All operations](https://skmtc.dev/earmarkiq/apis/earmark-api/llms.txt) · [OpenAPI document](https://skmtc.dev/earmarkiq/apis/earmark-api/revisions/4a2c41907105?raw)
