> For the complete documentation index, see [llms.txt](https://docs.udara360.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.udara360.io/udara360-docs-1/savings/frequentsavings/add-frequent-savings.md).

# Add Frequent Savings

The "Add Frequent Savings" endpoint allows customers to create a new frequent savings pocket.

<mark style="color:yellow;">`POST`</mark> `/api/savingsaccount/v1/frequentsavings/add`

To create a frequent savings account, you need to provide the necessary body parameters, such as `pocketName`, `liquidationAccount`, `productCode`, `amount`, and other relevant details.

**Headers**

| Name                                                | Value                |
| --------------------------------------------------- | -------------------- |
| Content-Type<mark style="color:red;">\*</mark>      | `application/json`   |
| Authorization<mark style="color:red;">\*</mark>     | `Bearer`             |
| Request-Reference<mark style="color:red;">\*</mark> | `{unique_reference}` |

**Body**

<table><thead><tr><th>Name</th><th>Data Type (Length)</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>pocketName</code></td><td>string (100)</td><td>true</td><td>Details of the savings, e.g. Rent, School Fees.</td></tr><tr><td><code>liquidationAccount</code></td><td>string (10)</td><td>true</td><td>This is the Customer Account that will be debited for the Savings.</td></tr><tr><td><code>amount</code></td><td>number</td><td>true</td><td>The Principal Amount.<br><br><em><mark style="color:red;">Amount should be sent in the base unit of the currency. For example, 1000 naira will be sent as 1000 * 100.</mark></em></td></tr><tr><td><code>deductionAmount</code></td><td>Integer</td><td>false</td><td>The amount to be deducted till the Target Amount is reached.<br><br><em><mark style="color:red;">Deduction Amount should be sent in the base unit of the currency. For example, 1000 naira will be sent as 1000 * 100.</mark></em></td></tr><tr><td><code>productCode</code></td><td>string (3)</td><td>true</td><td>The Fixed Deposit Product Code.<br><br><em><mark style="color:red;">Must be an active Fixed Deposit Product Code that exists on the CBA portal.</mark></em></td></tr><tr><td><code>frequency</code></td><td>Integer</td><td>true</td><td>How often the deduction towards the savings occurs.<br><br><mark style="color:red;">Enum (Daily = 1, Weekly = 2, Monthly = 3)</mark></td></tr><tr><td><code>commencementDate</code></td><td>Integer</td><td>true</td><td>The start date of the frequent savings.</td></tr><tr><td><code>maturityDate</code></td><td>Integer</td><td>true</td><td>The maturity date of the frequent savings.</td></tr><tr><td><code>interestRate</code></td><td>Integer</td><td>false</td><td>The applicable interest rate for the savings.<br><br><em><mark style="color:red;">Percentage should be in at most 3 decimal places.</mark></em></td></tr><tr><td><code>useDefaultInterestRate</code></td><td>boolean</td><td>false</td><td>Set true to use the product's default interest rate, or false to apply the custom interestRate supplied instead.</td></tr><tr><td><code>preferredTime</code></td><td>Integer</td><td>false</td><td>The preferred time for the deduction to occur.<br><br><em><mark style="color:red;">Preferred Time ranges from 0 to 23.</mark></em></td></tr><tr><td><code>accountCreationChannel</code></td><td>string</td><td>false</td><td>The channel through which this savings account is being created, e.g. Mobile, Web, USSD, or API.</td></tr><tr><td><code>imageURL</code></td><td>string</td><td>false</td><td>A URL pointing to an image associated with the savings pocket, for example, a goal image representing what the pocket is saving towards (Rent, School Fees, etc).</td></tr><tr><td><code>targetSavingsURL</code></td><td>string</td><td>false</td><td>A URL associated with the target savings goal, likely used for reference or tracking on the client side.</td></tr></tbody></table>

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

<details>

<summary>Sample Request</summary>

```json
curl --location -g '{{baseurl}}/api/savingsaccount/v1/frequentsavings/add' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data '{
  "pocketName": "string",
  "liquidationAccount": "string",
  "amount": 0,
  "deductionAmount": 0,
  "productCode": "strin",
  "frequency": "string",
  "commencementDate": "2025-02-23T21:06:10.309Z",
  "maturityDate": "2025-02-23T21:06:10.309Z",
  "interestRate": 0,
  "useDefaultInterestRate": true,
  "preferredTime": 0,
  "accountCreationChannel": "string",
  "imageURL": "string",
  "targetSavingsURL": "string"
}'
```

</details>

<details>

<summary>Response: <code>200</code></summary>

```json
{
  "status": true,
  "message": "string",
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "accountNumber": "string",
    "pocketName": "string"
  }
}
```

</details>
