> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.thepennyinc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.thepennyinc.com/_mcp/server.

# Update a capital account's low balance alert

PATCH https://sandbox.api.thepennyinc.com/accounts/capital/{account_id}/low_balance_alert
Content-Type: application/json

Update the threshold on a capital account's low balance alert.

Required permissions: `account:update`.

Reference: https://docs.thepennyinc.com/api-reference/penny-banking/accounts/capital/low-balance-alert/update

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://sandbox.api.thepennyinc.com` (Sandbox — safe for testing, no real money movement., default)
- `https://live.api.thepennyinc.com` (Live — real businesses, real money movement.)

## Request

### Path parameters

- `account_id` (string, required) — The ID of the Capital Account.

### Headers

- `X-Penny-As-Business` (string, optional, nullable) — Act on behalf of another business that has granted you access. Requires the `business:act_as` permission.

### Body (application/json)

This endpoint expects a LowBalanceAlertRequest.

- `threshold_amount` (LowBalanceAlertRequestThresholdAmount, required) — Balance level below which the alert event fires.

## Response

### 200

The updated capital account.

- `account_id` (string, required) — Unique identifier for the account.
- `version` (integer, required) — The current version of the account record.
- `version_time` (datetime, required) — ISO-8601 timestamp of the most recent account update.
- `program_id` (string, required) — The identifier of the program associated with this account.
- `business_id` (string, required) — The identifier of the business associated with this account.
- `business_entity_id` (string, required) — The identifier of the business entity associated with this account.
- `status` (enum, required) — The current operational status of the account.
  - Allowed values: `active`, `deactivated`, `suspended`, `deleting`, `deleted`
- `active` (boolean, required) — Whether the account is currently active and available for use.
- `currency` (enum, required) — ISO-4217 currency code for the account.
  - Allowed values: `USD`
- `root` (boolean, required) — Whether this is the root capital account for the business.
- `available_balance` (string, required) — The balance currently available for transactions, as a decimal string.
- `total_balance` (string, required) — The total balance including reserved funds, as a decimal string.
- `alias` (string, optional, nullable) — An optional label for the account.
- `description` (string, optional, nullable) — An optional description of the account's purpose.
- `type` (enum, optional, default: capital) — Account types exposed to client-facing API responses.
  - Allowed values: `capital`, `control`, `linked`
- `parent_account_id` (string, optional, nullable) — The identifier of the parent account if this account is part of a hierarchy.
- `spend_control_id` (string, optional, nullable) — The identifier of the spend control applied to this account.
- `auto_top_up` (AutoTopUpResponse, optional, nullable) — Automatic top-up configuration, if enabled.
- `low_balance_notification` (LowBalanceNotificationResponse, optional, nullable) — Low-balance notification configuration, if enabled.

## Errors

### 400 Bad Request Error

The request was malformed: a required field is missing or a value has the wrong type or format.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 401 Unauthorized Error

Authentication failed.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 403 Forbidden Error

The caller does not have permission to perform this action.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 404 Not Found Error

The capital account was not found, or has no low balance alert configured.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 422 Unprocessable Entity Error

The request was well-formed but could not be processed because it breaks a business rule.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 429 Too Many Requests Error

Too many requests; retry after the Retry-After header.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 500 Internal Server Error

An unexpected error occurred.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

## Types

### LowBalanceAlertRequestThresholdAmount

Balance level below which the alert event fires.

- double
- string

### AutoTopUpResponse

- `source_account_id` (string, required) — The account from which funds are drawn during top-up.
- `source_account_type` (enum, required) — The type of account from which funds are drawn during top-up.
  - Allowed values: `capital`
- `threshold_amount` (string, required) — The balance amount below which an automatic top-up is triggered.
- `top_up_amount` (string, required) — The amount added to the account when a top-up is triggered.

### LowBalanceNotificationResponse

- `threshold_amount` (string, required) — The balance amount below which a low-balance notification is sent.

## Examples

**Request**

```json
{
  "threshold_amount": "100.00"
}
```

**Response**

```json
{
  "account_id": "account_019372e3-b8dc-7de2-80b6-b8dcde20b6c9",
  "version": 1,
  "version_time": "2024-01-15T10:30:00Z",
  "program_id": "program_019377de-7f88-7f02-894f-7f88f0294fcb",
  "business_id": "business_01937b95-484e-75af-8c68-484e5afc68d3",
  "business_entity_id": "business_entity_01937c9d-3a1e-72b0-8881-3a1e2b088159",
  "status": "active",
  "active": true,
  "currency": "USD",
  "root": true,
  "available_balance": "1000.00",
  "total_balance": "1050.00",
  "alias": "operations-account",
  "description": "Primary operating account for day-to-day spend.",
  "type": "capital",
  "parent_account_id": "account_019372e3-b8dc-7de2-80b6-b8dcde20b6c9",
  "spend_control_id": "spend_control_019379d9-a170-796b-867a-a17096b67a21",
  "auto_top_up": {
    "source_account_id": "account_019372e3-b8dc-7de2-80b6-b8dcde20b6c9",
    "source_account_type": "capital",
    "threshold_amount": "500.00",
    "top_up_amount": "1000.00"
  },
  "low_balance_notification": {
    "threshold_amount": "200.00"
  }
}
```

**SDK Code**

```python
import requests

url = "https://sandbox.api.thepennyinc.com/accounts/capital/account_id/low_balance_alert"

payload = { "threshold_amount": "100.00" }
headers = {
    "X-Penny-As-Business": "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://sandbox.api.thepennyinc.com/accounts/capital/account_id/low_balance_alert';
const options = {
  method: 'PATCH',
  headers: {
    'X-Penny-As-Business': 'business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"threshold_amount":"100.00"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://sandbox.api.thepennyinc.com/accounts/capital/account_id/low_balance_alert"

	payload := strings.NewReader("{\n  \"threshold_amount\": \"100.00\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-Penny-As-Business", "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox.api.thepennyinc.com/accounts/capital/account_id/low_balance_alert")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-Penny-As-Business"] = 'business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"threshold_amount\": \"100.00\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://sandbox.api.thepennyinc.com/accounts/capital/account_id/low_balance_alert")
  .header("X-Penny-As-Business", "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"threshold_amount\": \"100.00\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://sandbox.api.thepennyinc.com/accounts/capital/account_id/low_balance_alert', [
  'body' => '{
  "threshold_amount": "100.00"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Penny-As-Business' => 'business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox.api.thepennyinc.com/accounts/capital/account_id/low_balance_alert");
var request = new RestRequest(Method.PATCH);
request.AddHeader("X-Penny-As-Business", "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"threshold_amount\": \"100.00\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Penny-As-Business": "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["threshold_amount": "100.00"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.api.thepennyinc.com/accounts/capital/account_id/low_balance_alert")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```