Skip to main content
PUT
/
api
/
user
/
template-categories
/
{id}
Update a template category (superadmin)
curl --request PUT \
  --url https://your-instance.example.com/api/user/template-categories/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "displayName": "Introduction",
  "color": "#2563EB",
  "isActive": true
}
'
{
  "_id": "64d2f9c5e8a1d4e001a0b1c2",
  "name": "tours",
  "displayName": "Tours",
  "description": "Tour-confirmation and follow-up templates.",
  "color": "#3B82F6",
  "sortOrder": 0,
  "isActive": true,
  "createdBy": {
    "fullName": "Acme Admin",
    "email": "admin@acme.example"
  },
  "createdAt": "2026-05-18T12:34:56.000Z",
  "updatedAt": "2026-05-18T12:34:56.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
name
string

New internal slug; lower-cased and trimmed before uniqueness check — endpoint returns 400 if it collides with another category.

displayName
string

New human-readable label shown in the template picker.

description
string

New blurb describing the category; pass an empty string to clear.

color
string

New Tailwind class string (or hex) for the category badge.

isActive
boolean

Whether the category should appear in pickers and lists; setting false soft-hides without deleting.

Response

Category updated

Template category record used to group SMS / campaign / script / automation templates. Returned by category create/update.

_id
string
required
name
string
required
displayName
string
description
string
color
string
sortOrder
integer
isActive
boolean
createdBy
object
createdAt
string<date-time>
updatedAt
string<date-time>