Update Category
PATCH
/api/v1/dashboard/content/categories/{category_id}Overview
Updates an existing category. Only the fields included in the request body are updated. You can move a category in the hierarchy by changing its parent_id.
Authentication
info
Bearer authentication required - Pass your credentials as Authorization: Bearer <client_id>:<api_key>:<api_secret>.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer <client_id>:<api_key>:<api_secret> |
Content-Type | string | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
category_id | string (UUID) | Yes | The unique identifier of the category |
Request Body
All fields are optional.
| Parameter | Type | Description |
|---|---|---|
name | string | Category display name |
slug | string | URL-friendly slug |
description | string | Category description |
parent_id | string (UUID) | null | Parent category ID (set to null to make top-level) |
sort_order | integer | Sort position within parent level |
Response
Returns the full updated category object.
Example Request
- cURL
- Python
- JavaScript
curl -X PATCH "https://spideriq.ai/api/v1/dashboard/content/categories/cat-004-uuid" \
-H "Authorization: Bearer $CLIENT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "API Integration Guides",
"description": "Complete guides for integrating with the SpiderIQ API",
"sort_order": 0
}'
import requests
category_id = "cat-004-uuid"
resp = requests.patch(
f"https://spideriq.ai/api/v1/dashboard/content/categories/{category_id}",
headers={"Authorization": f"Bearer {CLIENT_TOKEN}"},
json={
"name": "API Integration Guides",
"description": "Complete guides for integrating with the SpiderIQ API",
"sort_order": 0,
},
)
category = resp.json()
print(f"Updated: {category['name']}")
const categoryId = "cat-004-uuid";
const resp = await fetch(
`https://spideriq.ai/api/v1/dashboard/content/categories/${categoryId}`,
{
method: "PATCH",
headers: {
"Authorization": `Bearer ${CLIENT_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "API Integration Guides",
description: "Complete guides for integrating with the SpiderIQ API",
sort_order: 0,
}),
}
);
const category = await resp.json();
console.log(`Updated: ${category.name}`);
Example Response
{
"id": "cat-004-uuid",
"name": "API Integration Guides",
"slug": "api-guides",
"description": "Complete guides for integrating with the SpiderIQ API",
"parent_id": "cat-001-uuid",
"sort_order": 0,
"children": []
}
Status Codes
| Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | Category updated successfully |
| 400 | Bad Request | Invalid field values or circular parent reference |
| 401 | Unauthorized | Invalid or missing Bearer token |
| 404 | Not Found | Category not found or belongs to another client |
| 409 | Conflict | Slug already in use by another category |