# Enable Auto-Topup

Automatically add funds to your wallet when the balance falls below a specified threshold. Requires that a billing method is already set in the user interface.

### <mark style="color:green;">`POST`</mark> `/wallet/auto-topup/enable`

#### Required Permission

```
create:UserAutoTopUp
```

Your API key must have this permission enabled in order to use this endpoint.

#### Example Request

```bash
curl --location 'https://<hostname>/wallet/auto-topup/enable' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
    "amount": 15,
    "threshold": 10
  }'
```

Replace `YOUR_API_KEY` with your API key.

{% hint style="info" %}
All endpoints shown in this documentation use a **sample base URL**. The production API endpoint is provided by our team upon request.
{% endhint %}

#### Query Parameters

| Parameter | Type   | Required | Description                               |
| --------- | ------ | -------- | ----------------------------------------- |
| amount    | number | Yes      | Amount to top-up automatically.           |
| threshold | number | Yes      | Minimum balance that triggers the top-up. |

#### Response (HTTP 200)

```json
{
  "success": true,
  "autoTopupEnabled": true,
  "amount": 15,
  "threshold": 10
}
```

{% hint style="info" %}
**Auto-topup** requires a valid billing method set in the user interface.
{% endhint %}


---

# 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://wiki.mobivatebulksms.com/wallet-management/enable-auto-topup.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.
