---
title: "Update a fraud rule"
method: PATCH
path: "/api/v1/fraud-rules/{id}"
tags: ["Risk"]
---

# Update a fraud rule

`PATCH /api/v1/fraud-rules/{id}`

## Request

- Base URL: `https://merchant.zahlo.eu`
- URL: `https://merchant.zahlo.eu/api/v1/fraud-rules/{id}`
- Auth: API key in header `x-api-key`

Update a fraud rule. Use the response status and request ID to decide whether to retry, reconcile, or ask the customer for action.

## Path parameters

- `id` string, required

## Request body

- FraudRuleUpdateRequest
  - `value` string: An email (`block_email`), a domain (`block_email_domain`), an amount in minor units (`max_amount`/`min_amount`, with `currency`), or sessions per customer email per hour (`velocity_email_hour`).
  - `currency` string, nullable
  - `enabled` boolean

## Response `200`

Resource updated

- FraudRule
  - `id` string, required
  - `object` 'fraud_rule', required
  - `livemode` boolean, required
  - `createdAt` string, date-time, required
  - `kind` 'block_email' | 'block_email_domain' | 'max_amount' | 'min_amount' | 'velocity_email_hour', required
  - `value` string, required: An email (`block_email`), a domain (`block_email_domain`), an amount in minor units (`max_amount`/`min_amount`, with `currency`), or sessions per customer email per hour (`velocity_email_hour`).
  - `currency` string, nullable
  - `enabled` boolean, required

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `404`: Resource not found
- `409`: Request conflicts with existing state

---

[API](https://skmtc.dev/zahlo/apis/zahlo-merchant-api.md) - [All operations](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/revisions/8fcbef981e0d?raw)
