---
title: "Create a new AMM rule for an account"
method: POST
path: "/programs/{programCode}/accounts/{accountIdentifier}/ammRule"
tags: ["AMMRule"]
---

# Create a new AMM rule for an account

`POST /programs/{programCode}/accounts/{accountIdentifier}/ammRule`

Adds a new Auto Money Movement (AMM) rule to the specified account. Once applied, money can be automatically moved based on the rule parameters.

## Path parameters

- `programCode` string, required
- `accountIdentifier` string, required

## Headers

- `X-GD-RequestId` string, required

## Request body

- CreateAMMRuleRequest — Represents a request to create an Automated Money Movement (AMM) rule. Contains identifiers, scheduling, transfer details, configuration, and options for the new AMM rule. Inherits standard request metadata from Gd.Bos.DataTransfer.Request.RequestBase.
  - `ruleType` string, required — The type of rule to create (e.g., "RoundUp", "ScheduledTransfer").
  - `ruleFrequency` string, required — The frequency type of the rule (e.g., "Daily", "Weekly", "Monthly").
  - `ammRuleName` string, nullable — The name assigned to the AMM rule.
  - `startDate` string, date-time, required — The start date when the rule becomes active.
  - `endDate` string, date-time — The end date when the rule expires or is deactivated.
  - `qualifyAmount` number, double, required — The qualifying amount required to trigger the rule.
  - `maxCapAmount` number, double — The maximum cap amount for transfers under this rule.
  - `targetPurseID` string, uuid — The target purse identifier for the transfer.
  - `targetAccountID` string, uuid — The target account identifier for the transfer.
  - `contactName` string, nullable — The contact name associated with the rule or transfer.
  - `targetHandle` string, nullable — The handle (e.g., email, phone) of the transfer target.
  - `handleType` string, required — The type of handle used for the transfer (e.g., "Email", "Phone").
  - `rulePriority` integer — The priority of the rule for execution order.
  - `category` integer[], nullable — The list of merchant category codes associated with the rule.
  - `fixedTransferAmount` number, double — The fixed transfer amount for each execution of the rule.
  - `transferPercentage` number, double — The percentage of the qualifying amount to transfer.
  - `isRoundUpTransfer` boolean — Indicates whether the transfer is a round-up type.
  - `scheduleDay` integer — The scheduled day for rule execution (e.g., day of month).
  - `note` string, nullable — Additional notes or comments about the rule.
  - `transferType` string, nullable — The transfer type for the rule (e.g., "Purse", "PeerToPeer", "SccPayment").
  - `paymentAmountOption` string, nullable — The payment amount option for the rule (e.g., "Full", "Partial").
  - `sourceOption` string, nullable — The source option for the rule (e.g., "Checking", "Savings").
  - `timezoneOffset` integer, nullable — The timezone offset for rule execution, if applicable.
  - `isEdit` boolean — Indicates whether this request is for editing an existing rule.
  - `preRuleID` integer, nullable — The previous rule ID, used when editing or replacing an existing rule.

## Response `201`

Created

- CreateAMMRuleResponse — Represents the response returned after creating an Automated Money Movement (AMM) rule. Contains the unique enrollment key for the newly created AMM rule. Inherits standard response metadata from Gd.Bos.DataTransfer.Response.ResponseBase.
  - `ruleEnrollmentKey` integer — The unique enrollment key assigned to the newly created AMM rule. Used to reference and manage the rule in subsequent operations.
  - `responseDetails` ResponseDetail[], nullable — Required: A list of response details providing status codes, descriptions, and additional information about the result of the operation.
    - `code` integer — The primary status or error code for the response (e.g., 200 for success, 400 for validation error).
    - `subCode` integer, nullable — An optional subcode providing more granular detail about the response or error.
    - `description` string, nullable — A human-readable description of the response, error, or status.
    - `url` string, nullable — A URL linking to documentation or a web page with more information about the response code.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/greendot/apis/baas-apis.md) · [All operations](https://skmtc.net/greendot/apis/baas-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/greendot/baas-apis/versions/666553766b78/schema)
