# Create merchant rule by link

Saves the organization's allow or block rule for this merchant after verifying the passkey assertion. The passkey's owner must hold mandate:edit or approval:decide in the organization.

`POST /v1/public/approvals/{token}/rule`

Saves the organization's allow or block rule for this merchant after verifying the passkey assertion. The passkey's owner must hold mandate:edit or approval:decide in the organization.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `token` | path | yes | One-time approval token from the approval link. It is the only credential for this page. |

## Request body

```json
{
  "challenge_id": "cha_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "credential": {},
  "kind": "string"
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **404**: The resource does not exist or belongs to another organization.

Example 200 response:

```json
{
  "rule": {
    "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "org_id": "org_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "merchant_id": "mch_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "kind": "string",
    "max_amount_base_units": "50000",
    "created_by": "string",
    "created_at": "2026-11-16T12:00:00Z"
  },
  "merchant": {
    "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "name": "Example",
    "tier": "VERIFIED"
  }
}
```
