Skip to main content
POST
/
categories
Create category
curl --request POST \
  --url https://apigcp.trynia.ai/v2/categories \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "color": "<string>",
  "order": 1
}
'
{
  "id": "<string>",
  "name": "<string>",
  "user_id": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "organization_id": "<string>",
  "color": "<string>",
  "order": 0
}

Body

application/json
name
string
required

Category name

Required string length: 1 - 50
color
string | null

Hex color (e.g., #FF5733)

Maximum string length: 7
order
integer | null

Display order

Required range: x >= 0

Response

Successful Response

id
string
required
name
string
required
user_id
string
required
created_at
string
required
updated_at
string
required
organization_id
string | null
color
string | null
order
integer
default:0