update_transaction_category
Type: mutation
Updates an existing transaction category's name, icon, or group.
Signature
async def update_transaction_category(
category_id: str,
name: str | None = None,
icon: str | None = None,
group_id: str | None = None
) -> Dict[str, Any]
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
category_id | str | Yes | The ID of the category to update |
name | `str | None` | No |
icon | `str | None` | No |
group_id | `str | None` | No |
Returns
Dict with updateCategory containing the updated category and any errors
Example
from monarchmoney import MonarchMoney
mm = MonarchMoney()
await mm.login(email, password)
result = await mm.update_transaction_category("example_category_id")
print(result)
GraphQL Operation
Operation Name: UpdateCategory
GraphQL Query
mutation UpdateCategory($input: UpdateCategoryInput!) {
updateCategory(input: $input) {
category {
id
name
icon
group {
id
name
}
}
errors {
message
fieldErrors {
field
messages
}
}
}
}
Try It Out
To test this API method locally:
- Install the package:
pip install monarchmoney - Create a Python script with the example code above
- Replace
emailandpasswordwith your Monarch Money credentials - Run the script
See the Authentication Guide for details on logging in.