Batch delete
Delete several categories at once. All or nothing: if any id in the list is a system category, or still has transactions or planned transactions attached, nothing is deleted and the call fails with 400 or 409.
Authentication
sf_… API key in the bearerAuth field below.A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.
In: header
Path Parameters
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/companies/string/categories/batch_delete" \ -H "Content-Type: application/json" \ -d '{ "categoryIds": [ "string" ] }'{ "success": true}Update category
Update a category's name, emoji, `plTypes`, or order. Only the fields you send change. Narrowing `plTypes` does not rewrite transactions already categorized under the removed P&L type, so check reporting after a change like that.
Merge
Merge several categories into one, in a single transaction. Creates the category described by `newCategory`, then repoints everything that referenced the old ids: transaction categorizations, the default categorization on customers and vendors, and the default category on accounts. The old categories are deleted afterwards. This is how to retire duplicates without stranding history, since a plain delete is refused while transactions still use the category. One thing to know before running it: plan items on the old categories are deleted rather than repointed, so a merge drops that part of the financial plan. Returns the new category.