Categories
List categories
Get all transaction/expense categories with tax settings
GET
/
api
/
categories
List categories
curl --request GET \
--url https://api.ai2fin.com/api/categories \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ai2fin.com/api/categories"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ai2fin.com/api/categories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ai2fin.com/api/categories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ai2fin.com/api/categories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ai2fin.com/api/categories")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ai2fin.com/api/categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"categories": [
{
"id": "cmh0cat0007ab12cd34ef56",
"name": "Office Supplies",
"type": "expense",
"color": "#3B82F6",
"icon": null,
"emoji": "🖇️",
"description": null,
"isActive": true,
"categorySetId": null,
"taxTreatment": null
}
]
}{
"success": false,
"error": "Access token required"
}{
"success": false,
"error": "Access denied",
"message": "Feature not available in plan: automations",
"requiredPlan": "auto+"
}{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Try again in 20 seconds.",
"retryAfter": 20,
"limit": 2000,
"windowMs": 900000
}Authorizations
bearerAuthcookieAuth
First-party access token for your own signed-in session, obtained from the /api/enterprise-auth/login endpoint. The REST API returns your own account data to you — it is a first-party consumer surface, not a third-party integration channel. Data from connected bank feeds (open-banking / CDR data) is your own data, returned only to you in your own authenticated session.
Was this page helpful?
⌘I
List categories
curl --request GET \
--url https://api.ai2fin.com/api/categories \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ai2fin.com/api/categories"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ai2fin.com/api/categories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ai2fin.com/api/categories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ai2fin.com/api/categories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ai2fin.com/api/categories")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ai2fin.com/api/categories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"categories": [
{
"id": "cmh0cat0007ab12cd34ef56",
"name": "Office Supplies",
"type": "expense",
"color": "#3B82F6",
"icon": null,
"emoji": "🖇️",
"description": null,
"isActive": true,
"categorySetId": null,
"taxTreatment": null
}
]
}{
"success": false,
"error": "Access token required"
}{
"success": false,
"error": "Access denied",
"message": "Feature not available in plan: automations",
"requiredPlan": "auto+"
}{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Try again in 20 seconds.",
"retryAfter": 20,
"limit": 2000,
"windowMs": 900000
}