---
title: "Create or update a rule in the draft"
method: POST
path: "/resources/api/agent/amlResolutionRules/draft/rules"
tags: ["AmlResolutionRulesApiAgentResource"]
---

# Create or update a rule in the draft

`POST /resources/api/agent/amlResolutionRules/draft/rules`

Creates or updates a single rule in the draft. Omit `id` to create a new rule: the server assigns the id and appends the rule at the end of the evaluation order. Provide an existing `id` to update that rule in place; only the fields of this request body are written, everything else is preserved. If no draft exists yet, one is created automatically as a copy of the published revision. The response is the full draft with freshly recomputed `notices` — review them after every change.

## Request body

- AmlRulePublicDto — A single AML screening rule.
  - `condition` Condition
    - `astId` integer
    - `negate` boolean
    - `or` And[]
      - `and` Criterion[]
        - `args` Arg[]
          - `astId` integer
          - `exp` string
          - `lit` string
        - `astId` integer
        - `op` string
      - `astId` integer
      - `negate` boolean
      - `score` integer
  - `description` string — Free-form description of what the rule does.
  - `id` string — Id of the rule, unique within the rule chain. Omit to create a new rule: the server assigns the id and returns it in the response. Provide an existing id to update that rule.
  - `name` string, required — Display name of the rule.
  - `review` AmlRuleReviewActionPublicDto — Automatic review action applied to AML hits matched by the rule.
    - `expression` string — Condition expression guarding the review action: the action is applied only when it evaluates to true.
    - `matchStatus` Arg
      - `astId` integer
      - `exp` string
      - `lit` string
    - `note` Arg
      - `astId` integer
      - `exp` string
      - `lit` string
    - `riskLevel` Arg
      - `astId` integer
      - `exp` string
      - `lit` string
    - `whitelisted` Arg
      - `astId` integer
      - `exp` string
      - `lit` string
  - `tags` AmlRuleTagActionPublicDto — Tagging action applied to applicants whose AML hits match the rule.
    - `tags` string[] — Applicant tags to add when the rule matches.

## Response `default`

default response

- AmlScreeningRulesRevision — A revision of the AML screening rule chain.
  - `archived` AmlScreeningRulesActionTrail — Records who performed an action on the revision, and when.
    - `clientSubject` string — Name of the user who performed the action.
    - `date` string, date-time — When the action occurred.
  - `created` AmlScreeningRulesActionTrail — Records who performed an action on the revision, and when.
    - `clientSubject` string — Name of the user who performed the action.
    - `date` string, date-time — When the action occurred.
  - `id` string
  - `modified` AmlScreeningRulesActionTrail — Records who performed an action on the revision, and when.
    - `clientSubject` string — Name of the user who performed the action.
    - `date` string, date-time — When the action occurred.
  - `notices` AmlRuleNoticePublicDto[] — Validation findings for this revision. Publishing requires no error-level notices.
    - `message` string — Message key identifying the finding.
    - `messageParams` object — Parameters of the message, keyed by parameter name.
    - `ruleId` string — Id of the rule the finding refers to, when applicable.
    - `severity` string — Severity of the finding.
  - `published` AmlScreeningRulesActionTrail — Records who performed an action on the revision, and when.
    - `clientSubject` string — Name of the user who performed the action.
    - `date` string, date-time — When the action occurred.
  - `revision` integer — Revision number; increases with each new revision.
  - `revisionStatus` string — Current status of this revision.
  - `rules` AmlRulePublicDto[] — The AML screening rules, in evaluation order.
    - `condition` Condition
      - `astId` integer
      - `negate` boolean
      - `or` And[]
        - `and` Criterion[]
          - `args` Arg[]
            - `astId` integer
            - `exp` string
            - `lit` string
          - `astId` integer
          - `op` string
        - `astId` integer
        - `negate` boolean
        - `score` integer
    - `description` string — Free-form description of what the rule does.
    - `id` string — Id of the rule, unique within the rule chain. Omit to create a new rule: the server assigns the id and returns it in the response. Provide an existing id to update that rule.
    - `name` string, required — Display name of the rule.
    - `review` AmlRuleReviewActionPublicDto — Automatic review action applied to AML hits matched by the rule.
      - `expression` string — Condition expression guarding the review action: the action is applied only when it evaluates to true.
      - `matchStatus` Arg
        - `astId` integer
        - `exp` string
        - `lit` string
      - `note` Arg
        - `astId` integer
        - `exp` string
        - `lit` string
      - `riskLevel` Arg
        - `astId` integer
        - `exp` string
        - `lit` string
      - `whitelisted` Arg
        - `astId` integer
        - `exp` string
        - `lit` string
    - `tags` AmlRuleTagActionPublicDto — Tagging action applied to applicants whose AML hits match the rule.
      - `tags` string[] — Applicant tags to add when the rule matches.

---

[API](https://skmtc.net/sumsub/apis/sumsub-api-service.md) · [All operations](https://skmtc.net/sumsub/apis/sumsub-api-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumsub/sumsub-api-service/revisions/cd1cf0bbd4f9/schema)
