Skip to content

Delete a category

DELETE
/categories/{category}
curl --request DELETE \
--url https://flow.work.optidata.cloud/api/categories/993 \
--header 'Authorization: Bearer <token>'

Moves a category to the trash. The caller must own the category or have manage access to it; categories that mirror a group cannot be deleted here. Returns the trashed category.

category
required
integer

Id of the category. Read it from GET /categories.

The category, now in the trash.

Media typeapplication/json
object
id
required
integer
name
required
string
slug
required

URL-friendly form of the name.

string
description
string | null
visibility
required

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.

string
Allowed values: restricted internal public
is_public
required

Shortcut for visibility == public.

boolean
identifier

Short public identifier of the category.

string | null
user_id

Id of the user who owns the category, when it has one.

integer | null
group_id

Set when the category mirrors a group: it is shared with the group’s members, and its name and description follow the group’s.

integer | null
cuid

Identifier of the company the category belongs to.

string
created_at
string format: date-time
updated_at
string format: date-time
deleted_at

Set when the category is in the trash.

string | null format: date-time
Examples
Exampletrashed
{
"id": 993,
"cuid": "7f3c2a10-5b8e-4d21-9c6a-0e4f1b2d3c4a",
"name": "Onboarding",
"slug": "onboarding",
"description": "Everything a new hire needs in the first month.",
"created_at": "2026-10-19T13:50:38.000000Z",
"updated_at": "2026-10-19T13:53:24.000000Z",
"deleted_at": "2026-10-19T13:53:24.000000Z",
"visibility": "restricted",
"user_id": 20,
"identifier": "jYpV3A",
"group_id": null,
"is_public": false
}

No authentication key was sent.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller lacks the access this operation needs.

Media typeapplication/json

Generic error envelope used by permission, lookup and framework failures.

object
message
required
string
Examples
Exampledenied
{
"message": "This action is unauthorized."
}

No such resource — or it does not belong to the category or page in the path.

Media typeapplication/json

Generic error envelope used by permission, lookup and framework failures.

object
message
required
string
Examples
Examplemissing
{
"message": "No query results for model [App\\Models\\Page] 999999"
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Exampleexpired
{
"error": "JWT passport expired: Passport expired"
}