Skip to main content
PATCH
/
categories
/
{category_id}
Update category
curl --request PATCH \
  --url https://apigcp.trynia.ai/v2/categories/{category_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "color": "<string>",
  "order": 1
}
'
{
  "id": "<string>",
  "name": "<string>",
  "user_id": "<string>",
  "organization_id": "<string>",
  "color": "<string>",
  "order": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Path Parameters

category_id
string
required

Category UUID

Body

application/json
name
string

Category name

Required string length: 1 - 50
color
string

Hex color code (e.g.,

Maximum string length: 7
order
integer

Display order for sorting categories

Required range: x >= 0

Response

Category updated successfully

id
string

Unique identifier for the category

name
string

Category name

user_id
string

Owner user ID

organization_id
string | null

Organization ID if category belongs to an organization

color
string | null

Hex color code

order
integer

Display order

created_at
string<date-time>
updated_at
string<date-time>