# Create savings account

The example below shows how to create a savings account with an initial deposit.

## Use case

In this example, we will create a savings account linked to the currency account ID-23819.

<table><thead><tr><th width="369.99585459183675">Use case data</th><th>API parameters with values</th></tr></thead><tbody><tr><td>The savings account will be created for the currency account <code>ID-23819</code>.</td><td><pre><code>...accounts/ID-23819/savings
</code></pre></td></tr><tr><td>The name the customer has chosen for their new savings account.</td><td><pre class="language-json"><code class="lang-json">"savingName": "Emergency savings"
</code></pre></td></tr><tr><td><p>The intended end date for the savings account, if the customer has specified one.</p><p><strong>Note:</strong> This is an optional parameter.</p></td><td><pre class="language-json"><code class="lang-json">"savingEndDate": "2040-05-18"
</code></pre></td></tr><tr><td>The currency in which the savings account will be held.</td><td><pre class="language-json"><code class="lang-json">"currencyCode": "EUR"
</code></pre></td></tr><tr><td><p>The interest rate applied to the savings account.</p><p><strong>Note:</strong> This must be a number within the range defined by the interest method configured for the account type of the savings account.</p></td><td><pre class="language-json"><code class="lang-json">"interestRate": 3.1
</code></pre></td></tr><tr><td>The target amount to be saved in the savings account.</td><td><pre class="language-json"><code class="lang-json">"savingAmount": "1000"
</code></pre></td></tr><tr><td><p>The deposit amount that will be transferred to the savings account at the time of its creation.</p><p><strong>Note:</strong> This is a mandatory parameter, and its value must be greater than zero. The specified amount must be available on the linked currency account at the time of the request, as it will be automatically transferred when the savings account is created.</p></td><td><pre class="language-json"><code class="lang-json">"initialAmount": "10"
</code></pre></td></tr><tr><td><p>Defines the recurring deposit setup for the savings account.</p><p>It includes the deposit amount, frequency, and the specific day on which the deposit should occur. In this example, deposits are scheduled monthly on the 1st of each month.</p><p><strong>Note:</strong> This is an optional parameter.</p></td><td><pre class="language-json"><code class="lang-json">  "savingOrder": {
    "savingDay": 1,
    "amount": "50",
    "paymentFrequencyCode": "MONTHLY"
  }
</code></pre></td></tr></tbody></table>

{% hint style="info" %}
When creating a savings order, be sure to set the **savingDay** in accordance with the rules for the selected **paymentFrequencyCode**, as outlined in the table below.
{% endhint %}

<table><thead><tr><th width="270.2109375">paymentFrequencyCode</th><th>savingDay</th></tr></thead><tbody><tr><td>DAILY</td><td>No value allowed (null)</td></tr><tr><td>WEEKLY</td><td>Day of the week (1=Monday to 7=Sunday)</td></tr><tr><td>MONTHLY</td><td>Day of the month (1 to 31)</td></tr></tbody></table>

### Sample API call

To create a savings account linked to the currency account, use the following endpoint:

![](/files/eNhGqyuC8G3j4d5rnm9D)\
`https://account-api.sandbox.tuumplatform.com/api/v3/accounts/{accountId}/savings` &#x20;

{% hint style="info" %}
Learn more about the [create saving for account](https://developer.tuumplatform.com/explore#account-api_post_/api/v3/accounts/{accountId}/savings) endpoint in the Tuum developer portal.
{% endhint %}

### Sample request

The sample request body is as follows:

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
{
  "savingName": "Emergency savings",
  "savingEndDate": "2040-05-18",
  "currencyCode": "EUR",
  "interestRate": 3.1,
  "savingAmount": "1000",
  "initialAmount": "10",
  "savingOrder": {
    "savingDay": 1,
    "amount": "50",
    "paymentFrequencyCode": "MONTHLY"
  }
}
```

{% endcode %}
{% endtab %}

{% tab title="cURL" %}
{% code overflow="wrap" lineNumbers="true" %}

```
curl -L 'https://account-api.sandbox.tuumplatform.com/api/v3/accounts/ID-23819/savings' \
-H 'x-tenant-code: MB' \
-H 'Accept-Language: en' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoidGVzdGkgdGVzdCIsImVtcGxveWVlSWQiOiJJRC0xNDE3IiwidGVuYW50Q29kZSI6Ik1CIiwiZXhwaXJ5RFRpbWUiOiIyMDI1LTEwLTE0VDA4OjE2OjU2IiwiZXhwIjoxNzYwNDI5ODE2LCJyb2xlcyI6WyJBRE1JTiIsIlNZU1RFTSJdfQ.u--2o-oNtxOL4Ag_DrX8QV-LYNQzAdU-2RRTYlbKeHk' \
-H 'Content-Type: application/json' \
-d '{
  "savingName": "Emergency savings",
  "savingEndDate": "2040-05-18",
  "currencyCode": "EUR",
  "interestRate": 3.1,
  "savingAmount": "1000",
  "initialAmount": "10",
  "savingOrder": {
    "savingDay": 1,
    "amount": "50",
    "paymentFrequencyCode": "MONTHLY"
  }
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
If the user chooses to open a savings account without setting up a savings order, the following optional parameters can be skipped in the API request:

* **savingOrder**
* **savingDay**
* **amount**
* **paymentFrequencyCode**
  {% endhint %}

### Sample response

Below you will find the response to the API request:

<details>

<summary>Response</summary>

{% code lineNumbers="true" %}

```json
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "savingId": "ID-1491",
        "savingAccountId": "ID-23941",
        "currencyAccountId": "ID-23819",
        "savingName": "Emergency savings",
        "firstDebitDate": "2033-06-01",
        "lastDebitDate": null,
        "savingEndDate": "2040-05-18",
        "nextDebitDate": "2033-06-01",
        "currencyCode": "EUR",
        "interestRate": 3.10,
        "savingAmount": 1000,
        "initialAmount": 10,
        "orderAmount": 50,
        "savingDay": 1,
        "frequency": "MONTHLY",
        "manuallyEnded": false,
        "errorCode": null,
        "accountInterests": [
            {
                "accountInterestMethodId": "ID-000000015023",
                "accountTypeInterestMethodId": "ID-000000001290",
                "currencyCode": "EUR",
                "interestGroupCode": "DEPOSIT",
                "nextInterestCalculationDate": "2033-05-11",
                "balanceTypeCode": "END_OF_DAY",
                "calculationBaseTermCode": "SIMPLE",
                "rateTypeCode": "FIXED",
                "calcDaysMonth": "30",
                "calcDaysYear": "360",
                "paymentIntervalTypeCode": "MONTH",
                "minPayableInterestAmount": 0.01,
                "marginTypeCode": null,
                "conditions": [
                    {
                        "accountInterestConditionId": "ID-000000033574",
                        "amountRange": null,
                        "interestRate": 3.1,
                        "ratePeriodTypeCode": "PER_YEAR",
                        "interestTypeCode": "ACCO_INT",
                        "validityRange": {
                            "startDate": "2033-05-11",
                            "endDate": null
                        },
                        "source": null,
                        "rateBaseCode": null,
                        "baseRate": null,
                        "marginRate": null
                    }
                ]
            }
        ],
        "interestBalances": [],
        "accountNumbers": [
            {
                "accountNumberId": "ID-15148",
                "accountId": "ID-23941",
                "accountNumber": {
                    "value": "XX20XXXX99999000000000000127872",
                    "type": "IBAN"
                },
                "countryCode": "XX",
                "financialInstitutionId": {
                    "value": "ICECLOUDXXX",
                    "type": "BIC"
                },
                "accountNumberSubtype": null,
                "defaultCurrencyCode": "EUR",
                "statusCode": "ENABLED",
                "externalSyncEnabled": false,
                "validityRange": {
                    "endTime": null,
                    "startTime": "2025-10-14T07:31:32.92Z"
                }
            }
        ]
    }
}
```

{% endcode %}

</details>

## Result

The savings account has been successfully created and is now linked to the specified currency account. The initial amount has been transferred, and the savings account is ready for use. If a savings order was provided, it has also been successfully added and linked to the new savings account.

{% hint style="info" %}
By making multiple API calls with different parameters, you can link several savings accounts to a single servicing account. This setup provides flexibility for managing various savings goals.
{% endhint %}

## Troubleshooting

Here are some tips to help you address the most common errors.

| Error message                                         | Possible resolution                                                                                               |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| The source account was not found.                     | Ensure that the **accountId** referring to the servicing account is accurate and that the account remains active. |
| The initial amount is not a positive number.          | Ensure the **initialAmount** is at least `0.01` or another valid positive number.                                 |
| The given interest rate is outside the allowed range. | Ensure the **interestRate** is within the range set by the account type’s interest method.                        |
| The interest method was not found.                    | Ensure the interest method assignment code for the savings account matches the currency account configuration.    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tuum.com/tuum-developer-docs/api-cookbooks/accounts/savings-accounts/create-savings-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
