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

# Update Auto Top-Up

> Builds calldata to update an existing auto top-up configuration.

<Info>
  The `asset` parameter is the credit asset symbol — currently supported values are `usdc` and `eure`. The `threshold` and `targetBalance` are in wei. `healthFactor` is in basis points (10000 = 1.0).
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000'
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update",
      params={"receiver": "0xRECEIVER", "threshold": "500000000", "targetBalance": "1000000000"}
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000"
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"io"
  	"net/http"
  )

  func main() {
  	resp, _ := http.Get("https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000")
  	defer resp.Body.Close()
  	body, _ := io.ReadAll(resp.Body)
  	fmt.Println(string(body))
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "calls": [
      {
        "chain": "8453",
        "to": "0x1234567890abcdef1234567890abcdef12345678",
        "data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000005f5e100",
        "value": "0"
      }
    ]
  }
  ```
</ResponseExample>

<Tip>
  **Machine-readable API spec:** [OpenAPI JSON](https://api.sprinter.tech/swagger/doc.json) | [Swagger UI](https://api.sprinter.tech/swagger/index.html)
</Tip>


## OpenAPI

````yaml get /credit/v2/accounts/{account}/assets/{asset}/operator/auto-topup/update
openapi: 3.0.0
info:
  contact: {}
  title: ''
  version: 0.0.1
servers:
  - url: https://api.sprinter.tech
    description: Production server
security: []
paths:
  /credit/v2/accounts/{account}/assets/{asset}/operator/auto-topup/update:
    get:
      tags:
        - Credit
      summary: Update auto top-up config
      description: Builds calldata to update an existing auto top-up configuration.
      parameters:
        - description: User account address
          name: account
          in: path
          required: true
          schema:
            type: string
        - example: usdc
          description: Credit asset symbol (e.g. usdc, eure)
          name: asset
          in: path
          required: true
          schema:
            type: string
        - description: Receiver address whose config is being updated
          name: receiver
          in: query
          required: true
          schema:
            type: string
        - description: New balance threshold that triggers top-up (in wei)
          name: threshold
          in: query
          required: true
          schema:
            type: string
        - description: New target balance after top-up (in wei, must be >= threshold)
          name: targetBalance
          in: query
          required: true
          schema:
            type: string
        - description: Minimum health factor in basis points (10000 = 1.0)
          name: healthFactor
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Calldata to update auto top-up
          content:
            application/json:
              schema:
                $ref: 1538fda9-427a-4692-b0f5-1aa49e38e992

````