Update Bank Account
Overview
The Update Bank Account API allows you to update specific fields of a bank account associated with a business. This is a partial update operation - only the fields provided in the request body will be modified. The account must belong to the specified business and the authenticated user must have permission to modify it.
Resource Access
- HTTP Method:
POST - Endpoint:
/v1/businesses/{business_id}/bank_accounts/{bank_account_id} - Authentication: Bearer token required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
business_id | string (UUID) | Yes | Unique identifier for the business |
bank_account_id | string (UUID) | Yes | Unique identifier for the bank account |
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Accept | application/json | Yes | Content type for the response |
Authorization | Bearer {access_token} | Yes | Bearer token for authentication |
Request Body
The request body should contain a JSON object with only the fields you want to update. All fields are optional in the request body.
{
"bank_name": "New Name",
"user_data": {
"nickname": "Updated Nickname",
"purpose": "Updated Purpose"
}
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
bank_name | string | No | Updated name of the bank or financial institution |
user_data | object | No | Updated additional user-defined data |
Response
Success Response (200 OK)
{
"id": "urn:uuid:bank-account-123",
"business_id": "urn:uuid:9b397b0d-69bc-b09f-9d82-0e02637042fc",
"account_number": "****4567",
"account_type": "checking",
"bank_name": "New Name",
"routing_number": "123456789",
"status": "active",
"user_data": {
"nickname": "Updated Nickname",
"purpose": "Updated Purpose"
},
"created_at": "2022-01-01T00:00:00.000Z",
"updated_at": "2022-01-01T12:00:00.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier for the bank account |
business_id | string (UUID) | Business ID this account belongs to |
account_number | string | Masked account number for security |
account_type | string | Type of bank account |
bank_name | string | Name of the bank |
routing_number | string | ABA routing number |
status | string | Account status |
user_data | object | Additional user-defined data |
created_at | string (date-time) | Creation timestamp |
updated_at | string (date-time) | Last update timestamp |
Account Status Values
pending_verification: Account created but not yet verifiedverified: Account verified and ready for useactive: Account is active and can be used for transactionssuspended: Account temporarily suspendedclosed: Account has been closed
Error Responses
- 400 Bad Request: Invalid input data or field format
- 401 Unauthorized: Invalid or missing authentication token
- 403 Forbidden: User does not have permission to update this bank account
- 404 Not Found: Business or bank account not found
Code Examples
cURL
curl -X POST \
'https://api.example.com/v1/businesses/urn:uuid:9b397b0d-69bc-b09f-9d82-0e02637042fc/bank_accounts/urn:uuid:bank-account-123' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-d '{
"bank_name": "New Name",
"user_data": {
"nickname": "Updated Nickname",
"purpose": "Updated Purpose"
}
}'
Python
import requests
url = "https://api.example.com/v1/businesses/urn:uuid:9b397b0d-69bc-b09f-9d82-0e02637042fc/bank_accounts/urn:uuid:bank-account-123"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
data = {
"bank_name": "New Name",
"user_data": {
"nickname": "Updated Nickname",
"purpose": "Updated Purpose"
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
JavaScript (Node.js)
const axios = require('axios');
const url = 'https://api.example.com/v1/businesses/urn:uuid:9b397b0d-69bc-b09f-9d82-0e02637042fc/bank_accounts/urn:uuid:bank-account-123';
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
};
const data = {
bank_name: 'New Name',
user_data: {
nickname: 'Updated Nickname',
purpose: 'Updated Purpose'
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response.data);
});
Usage Notes
- This is a partial update operation - only provided fields will be modified
- Account numbers and routing numbers cannot be updated through this API
- Account type cannot be changed after creation
- The
updated_attimestamp will be automatically updated - Users can only update accounts they have permission to modify
- The
user_dataobject will be completely replaced if provided - Account status transitions may be restricted based on business rules