Rename a subaccount
Renames an existing subaccount by updating its display name.
## Path Parameters
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `subaccount_id` | UUID | Yes | ID of the subaccount to rename |
## Request Body
| Field | Type | Required | Description | Validation Rules |
|-------|------|----------|-------------|-----------------|
| `name` | String | Yes | New display name of the subaccount | Must be between 1 and 100 characters |
## Response Body
| Field | Type | Description |
|-------|------|-------------|
| `id` | UUID | Unique identifier of the subaccount |
| `name` | String | Updated subaccount name |
| `account_number` | String | Account number for deposits |
| `routing_number` | String | Deprecated: use `routing_numbers.ach`. Kept for backward compatibility |
| `routing_numbers` | Object | Routing numbers per rail |
| `routing_numbers.ach` | String | ACH routing number for ACH transfers |
| `routing_numbers.wire` | String | Wire routing number for wire transfers |
| `total_incoming_in_minor_units` | Integer | Total incoming funds in the smallest unit of the account's currency |
| `total_outgoing_in_minor_units` | Integer | Total outgoing funds in the smallest unit of the account's currency |
| `created_at` | DateTime | ISO 8601 timestamp when the subaccount was created |
| `updated_at` | DateTime | ISO 8601 timestamp when the subaccount was last updated |
## Notes
- Subaccount `name` values are allowed to duplicate within the same entity.
- If `name` is unchanged, the endpoint is idempotent and returns `200` with the current subaccount state.
Authentication
x-api-keystring
RootPay API key sent in the x-api-key header. Keys are environment-scoped: live_* for production, test_* for sandbox.
Path parameters
subaccount_id
The ID of the subaccount to rename
Request
This endpoint expects an object.
name
New display name of the subaccount
Response
Subaccount renamed successfully