> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create new program rule

> Create a new rule for a reward program short code.

POST/credit/rewards/rules

Create a new rule for a reward program short code.

## Request body

| Fields | Description |
| - | - |
| token string  Optional | Unique identifier of the rule. **Allowable Values:**  36 char max |
| description string  Required | Description of the rule. **Allowable Values:**  255 char max |
| type string  Required | Type of rule. - `MULTIPLIER_PER_TRANSACTION` - Defined multiplier is applied to every eligible transaction: for example, 1X every transaction (\$5 transaction receives five reward points). **Allowable Values:**  `MULTIPLIER_PER_TRANSACTION` |
| calculation\_type string  Optional | Type of calculation to use to evaluate if a rule has been satisfied. - `PER_TRANSACTION` - Rule is applied to all transactions, regardless of cumulative spend: for example, earn 1x on all transactions, regardless of category or spend total. **Allowable Values:**  `PER_TRANSACTION` |
| multiplier decimal  Optional | Reward multiplier to apply the transaction, where '1' means 1x the transaction amount. **Allowable Values:**  Any integer |
| amount decimal  Optional | Static amount to reward if rule conditions are met. **Allowable Values:**  Any integer |
| attributes object  Optional | Attributes are additional properties for which the rule can used to determine reward accrual eligibility for a transaction. **Allowable Values:**  `mcc`, `mid` |
| attributes.**mcc** array of strings  Optional | List of merchant category codes (MCCs). Must be a four-digit number, or a range of two four-digit numbers separated by a hyphen. **Allowable Values:**  One or more four-digit merchant category codes **Example Values:**`0001-1499`, `1500` |
| attributes.**mid** string  Optional | Merchant ID for the rule. **Allowable Values:**  255 char max **Example Value:**`my_merchant_identifier` |
| start\_time datetime  Optional | Start date and time when the rule becomes active, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| end\_time datetime  Optional | End date and time when the rule becomes active, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| is\_active boolean  Optional | A value of `true` indicates that the rule is active. **Allowable Values:**  `true`, `false` **Default value:**`true` |

## Sample request body

```json JSON lines wrap theme={null}
{
  "token": "00fb5637-2dab-4833-aa12-0463e7cf8cbb",
  "description": "Earn 1x on all purchases.",
  "type": "MULTIPLIER_PER_TRANSACTION",
  "calculation_type": "PER_TRANSACTION",
  "multiplier": 1,
  "start_time": "2024-01-05T20:37:11Z",
  "is_active": true
}
```

## Response body

| Fields | Description |
| - | - |
| data array of objects  Returned | List of rule objects. **Allowable Values:**  Valid array of one or more rule objects |
| data\[].**token** string  Returned | Unique identifier of the rule. **Allowable Values:**  36 char max |
| data\[].**description** string  Returned | Description of the rule. **Allowable Values:**  255 char max |
| data\[].**type** string  Returned | Type of rule. - `MULTIPLIER_PER_TRANSACTION` - Defined multiplier is applied to every eligible transaction: for example, 1X every transaction (\$5 transaction receives five reward points). **Allowable Values:**  `MULTIPLIER_PER_TRANSACTION` |
| data\[].**calculation\_type** string  Conditionally returned | Type of calculation to use to evaluate if a rule has been satisfied. - `PER_TRANSACTION` - Rule is applied to all transactions, regardless of cumulative spend: for example, earn 1x on all transactions, regardless of category or spend total. **Allowable Values:**  `PER_TRANSACTION` |
| data\[].**multiplier** decimal  Conditionally returned | Reward multiplier to apply the transaction, where `1` means 1x the transaction amount. **Allowable Values:**  Any integer |
| data\[].**amount** decimal  Conditionally returned | Static amount to reward if rule conditions are met. **Allowable Values:**  Any integer |
| data\[].**attributes** object  Conditionally returned | Attributes are additional properties for which the rule can used to determine reward accrual eligibility for a transaction. **Allowable Values:**  `mcc`, `mid` |
| data\[].attributes.**mcc** array of strings  Conditionally returned | List of merchant category codes (MCCs). Must be a four-digit number, or a range of two four-digit numbers separated by a hyphen. **Allowable Values:**  One or more four-digit merchant category codes **Example Values:**`0001-1499`, `1500` |
| data\[].attributes.**mid** string  Conditionally returned | Merchant ID for the rule. **Allowable Values:**  255 char max **Example Value:**`my_merchant_identifier` |
| data\[].**start\_time** datetime  Conditionally returned | Start date and time when the rule should become active, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| data\[].**end\_time** datetime  Conditionally returned | End date and time when the active rule should become inactive, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| data\[].**is\_active** boolean  Conditionally returned | A value of `true` indicates that the rule is active. **Allowable Values:**  `true`, `false` **Default value:**`true` |
| data\[].**created\_time** datetime  Conditionally returned | Date and time when the rule was created on the Marqeta platform, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| data\[].**updated\_time** datetime  Conditionally returned | Date and time when the rule was last updated on the Marqeta platform, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |

## Sample response body

```json JSON lines wrap theme={null}
{
  "data": [
    {
      "token": "00fb5637-2dab-4833-aa12-0463e7cf8cbb",
      "description": "Earn 1x on all purchases.",
      "type": "MULTIPLIER_PER_TRANSACTION",
      "calculation_type": "PER_TRANSACTION",
      "multiplier": 1,
      "start_time": "2024-01-05T20:37:11Z",
      "is_active": true,
      "created_time": "2024-01-05T20:37:11Z",
      "updated_time": "2024-01-05T20:37:11Z"
    }
  ]
}
```


## Related topics

- [Reward Rules Management Overview](https://www.marqeta.com/docs/core-api/credit-reward-rules-management.md)
- [Credit Programs in the Marqeta Dashboard](https://www.marqeta.com/docs/developer-guides/credit-programs-dashboard.md)
- [Real-Time Decisioning Dashboard Quick Start](https://www.marqeta.com/docs/developer-guides/real-time-decisioning-dashboard-quick-start.md)
- [Create reward policy](https://www.marqeta.com/docs/core-api/credit-policies/reward-policies/create-reward.md)
- [Create bundle](https://www.marqeta.com/docs/core-api/credit-bundles/create-bundle.md)
