Update a category
const url = 'https://flow.work.optidata.cloud/api/categories/993';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Onboarding (2026)","description":"Everything a new hire needs in the first month."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://flow.work.optidata.cloud/api/categories/993 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Onboarding (2026)", "description": "Everything a new hire needs in the first month." }'Renames a category, rewrites its description or changes its visibility. The caller must own the category or have manage access to it.
Send the full set of editable fields: name is required, and an omitted
description is cleared. An omitted visibility is kept. Categories that
mirror a group take their name from the group and cannot be changed here.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Id of the category. Read it from GET /categories.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Category name, unique within the company.
Who can see a category. restricted: only the people and groups it is
shared with. internal: everyone in the company. public: anyone with the
link, including people who are not signed in.
Examples
{ "name": "Onboarding (2026)", "description": "Everything a new hire needs in the first month."}Responses
Section titled “ Responses ”The updated category.
object
URL-friendly form of the name.
Who can see a category. restricted: only the people and groups it is
shared with. internal: everyone in the company. public: anyone with the
link, including people who are not signed in.
Shortcut for visibility == public.
Short public identifier of the category.
Id of the user who owns the category, when it has one.
Set when the category mirrors a group: it is shared with the group’s members, and its name and description follow the group’s.
Identifier of the company the category belongs to.
Set when the category is in the trash.
Examples
{ "id": 993, "cuid": "7f3c2a10-5b8e-4d21-9c6a-0e4f1b2d3c4a", "name": "Onboarding (2026)", "slug": "onboarding-2026", "description": "Everything a new hire needs in the first month.", "created_at": "2026-10-19T13:50:38.000000Z", "updated_at": "2026-10-19T13:52:05.000000Z", "deleted_at": null, "visibility": "restricted", "user_id": 20, "identifier": "jYpV3A", "group_id": null, "is_public": false}No authentication key was sent.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller lacks the access this operation needs.
Generic error envelope used by permission, lookup and framework failures.
object
Examples
{ "message": "This action is unauthorized."}No such resource — or it does not belong to the category or page in the path.
Generic error envelope used by permission, lookup and framework failures.
object
Examples
{ "message": "No query results for model [App\\Models\\Page] 999999"}The authentication key is expired or not recognised. Get a fresh one and retry.
Authentication failures use an error key rather than message.
object
Examples
{ "error": "JWT passport expired: Passport expired"}The body failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}{ "message": "The selected visibility is invalid.", "errors": { "visibility": [ "The selected visibility is invalid." ] }}