Update a category
Renames, re-parents, or restyles a custom category. Requires the categories:write scope, writes_enabled, and an Idempotency-Key.
A SYSTEM category (is_system true — the seeded defaults) returns 409 with the detail "System categories cannot be changed or deleted through the API."; every other feature keys on that tree, so it is not a programmatic caller's to rewrite. An excluded or nonexistent category returns the same 404.
curl -X PATCH "https://api.403fin.io/v1/categories/123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: example_string" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"name": "John Doe",
"parent_id": "123e4567-e89b-12d3-a456-426614174000",
"clear_parent": true,
"icon": "example_string",
"color": "example_string"
}'
import requests
import json
url = "https://api.403fin.io/v1/categories/123e4567-e89b-12d3-a456-426614174000"
headers = {
"Content-Type": "application/json",
"Idempotency-Key": "example_string",
"Authorization": "Bearer YOUR_API_TOKEN",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"name": "John Doe",
"parent_id": "123e4567-e89b-12d3-a456-426614174000",
"clear_parent": true,
"icon": "example_string",
"color": "example_string"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.403fin.io/v1/categories/123e4567-e89b-12d3-a456-426614174000", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "example_string",
"Authorization": "Bearer YOUR_API_TOKEN",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"name": "John Doe",
"parent_id": "123e4567-e89b-12d3-a456-426614174000",
"clear_parent": true,
"icon": "example_string",
"color": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "John Doe",
"parent_id": "123e4567-e89b-12d3-a456-426614174000",
"clear_parent": true,
"icon": "example_string",
"color": "example_string"
}`)
req, err := http.NewRequest("PATCH", "https://api.403fin.io/v1/categories/123e4567-e89b-12d3-a456-426614174000", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", "example_string")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.403fin.io/v1/categories/123e4567-e89b-12d3-a456-426614174000')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['Idempotency-Key'] = 'example_string'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"name": "John Doe",
"parent_id": "123e4567-e89b-12d3-a456-426614174000",
"clear_parent": true,
"icon": "example_string",
"color": "example_string"
}'
response = http.request(request)
puts response.body
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"parent_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "John Doe",
"icon": "example_string",
"color": "example_string",
"type_tag": "example_string",
"is_system": true,
"sort_order": 42
},
"pagination": {
"next_cursor": "example_string",
"has_more": true
},
"redacted_fields": [
"example_string"
],
"filtered": true
}
{}
/v1/categories/{id}Target server for requests. Edit to use your own host.
An opaque ff_ credential (ff_ak_ / ff_at_) presented as a Bearer token.
An opaque ff_ credential presented in the X-API-Key header.
The resource UUID.
The media type of the request body
A caller-chosen unique key (1-128 chars) that makes the write idempotent. A retry with the SAME key against the SAME operation, resource, and body replays the original response (Idempotency-Replayed: true). The same key with anything different — a changed body, a different endpoint, or a different {id} — is a 409 conflict; a still-in-flight duplicate is 409 with Retry-After. Required on every write. Stored for 24 hours. The key is bound to the target, not only to the payload, so reusing one key across two deletes (which carry no body at all) conflicts rather than replaying the first delete's response.
Move the category to the top level.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. An opaque ff_ credential (ff_ak_ / ff_at_) presented as a Bearer token.
API Key for authentication. An opaque ff_ credential presented in the X-API-Key header.
Path Parameters
The resource UUID.
Headers
A caller-chosen unique key (1-128 chars) that makes the write idempotent. A retry with the SAME key against the SAME operation, resource, and body replays the original response (Idempotency-Replayed: true). The same key with anything different — a changed body, a different endpoint, or a different {id} — is a 409 conflict; a still-in-flight duplicate is 409 with Retry-After. Required on every write. Stored for 24 hours.
The key is bound to the target, not only to the payload, so reusing one key across two deletes (which carry no body at all) conflicts rather than replaying the first delete's response.
Body
Move the category to the top level.
Responses
Cursor pagination state, present on list endpoints.
Field ids stripped from the payload by connection scope.
True when row or aggregate filtering is in effect for this response.