Back to KB
Difficulty
Intermediate
Read Time
4 min

Manage Individual Articles (`/api/admin/articles/[id]`)

By Codcompass TeamΒ·Β·4 min read

Manage Individual Articles (/api/admin/articles/[id])

Overview

The /api/admin/articles/[id] endpoint provides programmatic control over individual knowledge base articles within the CodCompass platform. It supports two primary operations: partial updates via PATCH to manage article lifecycle states, content, and metadata, and permanent removal via DELETE to erase articles from the database.

This endpoint is designed for administrative workflows, CMS integrations, and automated publishing pipelines. It is typically invoked when moderating user submissions, applying editorial changes, adjusting monetization flags, or cleaning up outdated content. Because the endpoint operates directly on the platform's Supabase-backed Article table, all changes are immediately reflected in the knowledge base once the request succeeds.

Endpoint Reference

PropertyValue
Base URLhttps://codcompass.com
Path/api/admin/articles/[id]
HTTP MethodsPATCH, DELETE
AuthenticationPublic (No authentication required)
Content-Typeapplication/json
Path Parameterid (string) – Unique article identifier

Request Format

Headers

HeaderRequiredDescription
Content-TypeYesMust be application/json for PATCH requests

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe UUID or slug of the target article

Request Body (PATCH only)

The

πŸŽ‰ Mid-Year Sale β€” Unlock Full Article

Base plan from just $4.99/mo or $49/yr

Sign in to read the full article and unlock all 635+ tutorials.

Sign In / Register β€” Start Free Trial

7-day free trial Β· Cancel anytime Β· 30-day money-back

Sources

  • β€’ api-reference