# Knowledgebase endpoints (Admin API)

> 18 FeatherPanel Admin API endpoints from admin/knowledgebase.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/admin/knowledgebase/

Defined in [`backend/app/routes/admin/knowledgebase.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php). Authentication used here: **Admin**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/rate-limits-and-errors/) for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

## Endpoints

### GET `/api/admin/knowledgebase/categories`

- Auth: Admin
- Permission: `admin.knowledgebase.categories.view`
- Route name: `admin-knowledgebase-categories`
- Controller: [`KnowledgebaseController::categoriesIndex`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L29)

**Get all knowledgebase categories** Retrieve a paginated list of all knowledgebase categories with optional search functionality.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | integer | no | Page number for pagination |
| `limit` | query | integer | no | Number of records per page |
| `search` | query | string | no | Search term to filter categories |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `categories` | KnowledgebaseCategory\[\] |  |
| `pagination` | KnowledgebasePagination |  |
| `search` | object |  |

```bash
curl -X GET "$PANEL_URL/api/admin/knowledgebase/categories" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:categories:retrieved`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-categories-retrieved)

Responses: `200` Categories retrieved successfully · `401` Unauthorized · `403` Forbidden - Insufficient permissions

### GET `/api/admin/knowledgebase/categories/{id}`

- Auth: Admin
- Permission: `admin.knowledgebase.categories.view`
- Route name: `admin-knowledgebase-categories-show`
- Controller: [`KnowledgebaseController::categoriesShow`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L40)

**Get knowledgebase category by ID** Retrieve a specific knowledgebase category by its ID.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Category ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `category` | KnowledgebaseCategory |  |

```bash
curl -X GET "$PANEL_URL/api/admin/knowledgebase/categories/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:category:retrieved`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-category-retrieved)

Responses: `200` Category retrieved successfully · `400` Bad request - Invalid ID · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Category not found

### PUT `/api/admin/knowledgebase/categories`

- Auth: Admin
- Permission: `admin.knowledgebase.categories.create`
- Route name: `admin-knowledgebase-categories-create`
- Controller: [`KnowledgebaseController::categoriesCreate`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L56)

**Create new knowledgebase category** Create a new knowledgebase category with name, slug, and icon.

Request body: [`KnowledgebaseCategoryCreate`](https://featherpanel.com/docs/api/schemas/#schema-knowledgebasecategorycreate) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | Category name |
| `slug` | string | no | Category slug |
| `icon` | string | yes | Category icon URL |
| `description` | string | no | Category description |
| `position` | integer | no | Category position for sorting |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `category` | KnowledgebaseCategory |  |

```bash
curl -X PUT "$PANEL_URL/api/admin/knowledgebase/categories" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"","slug":"","icon":"","description":"","position":0}'
```

Plugin events: [`featherpanel:admin:knowledgebase:category:created`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-category-created)

Responses: `201` Category created successfully · `400` Bad request - Validation errors · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `500` Internal server error

### PATCH `/api/admin/knowledgebase/categories/{id}`

- Auth: Admin
- Permission: `admin.knowledgebase.categories.edit`
- Route name: `admin-knowledgebase-categories-update`
- Controller: [`KnowledgebaseController::categoriesUpdate`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L68)

**Update knowledgebase category** Update an existing knowledgebase category. Only provided fields will be updated.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Category ID |

Request body: [`KnowledgebaseCategoryUpdate`](https://featherpanel.com/docs/api/schemas/#schema-knowledgebasecategoryupdate) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no | Category name |
| `slug` | string | no | Category slug |
| `icon` | string | no | Category icon URL |
| `description` | string | no | Category description |
| `position` | integer | no | Category position for sorting |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `category` | KnowledgebaseCategory |  |

```bash
curl -X PATCH "$PANEL_URL/api/admin/knowledgebase/categories/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"","slug":"","icon":"","description":"","position":0}'
```

Plugin events: [`featherpanel:admin:knowledgebase:category:updated`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-category-updated)

Responses: `200` Category updated successfully · `400` Bad request - Validation errors · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Category not found · `500` Internal server error

### DELETE `/api/admin/knowledgebase/categories/{id}`

- Auth: Admin
- Permission: `admin.knowledgebase.categories.delete`
- Route name: `admin-knowledgebase-categories-delete`
- Controller: [`KnowledgebaseController::categoriesDelete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L85)

**Delete knowledgebase category** Permanently delete a knowledgebase category. This will also delete all articles in this category.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Category ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `message` | string | Success message |

```bash
curl -X DELETE "$PANEL_URL/api/admin/knowledgebase/categories/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:category:deleted`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-category-deleted)

Responses: `200` Category deleted successfully · `400` Bad request - Invalid category ID · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Category not found · `500` Internal server error

### GET `/api/admin/knowledgebase/articles`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.view`
- Route name: `admin-knowledgebase-articles`
- Controller: [`KnowledgebaseController::articlesIndex`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L104)

**Get all knowledgebase articles** Retrieve a paginated list of all knowledgebase articles with optional filters.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | integer | no | Page number for pagination |
| `limit` | query | integer | no | Number of records per page |
| `search` | query | string | no | Search term to filter articles |
| `category_id` | query | integer | no | Filter by category ID |
| `status` | query | string | no | Filter by status |
| `pinned` | query | boolean | no | Filter by pinned status |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `articles` | KnowledgebaseArticle\[\] |  |
| `pagination` | KnowledgebasePagination |  |
| `search` | object |  |

```bash
curl -X GET "$PANEL_URL/api/admin/knowledgebase/articles" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:articles:retrieved`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-articles-retrieved)

Responses: `200` Articles retrieved successfully · `401` Unauthorized · `403` Forbidden - Insufficient permissions

### GET `/api/admin/knowledgebase/articles/{id}`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.view`
- Route name: `admin-knowledgebase-articles-show`
- Controller: [`KnowledgebaseController::articlesShow`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L115)

**Get knowledgebase article by ID** Retrieve a specific knowledgebase article by its ID.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `article` | KnowledgebaseArticle |  |

```bash
curl -X GET "$PANEL_URL/api/admin/knowledgebase/articles/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:article:retrieved`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-article-retrieved)

Responses: `200` Article retrieved successfully · `400` Bad request - Invalid ID · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article not found

### PUT `/api/admin/knowledgebase/articles`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.create`
- Route name: `admin-knowledgebase-articles-create`
- Controller: [`KnowledgebaseController::articlesCreate`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L131)

**Create new knowledgebase article** Create a new knowledgebase article with title, slug, content, and optional icon.

Request body: [`KnowledgebaseArticleCreate`](https://featherpanel.com/docs/api/schemas/#schema-knowledgebasearticlecreate) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | integer | yes | Category ID |
| `title` | string | yes | Article title |
| `slug` | string | no | Article slug |
| `icon` | string | no | Article icon/logo URL |
| `content` | string | yes | Article content |
| `author_id` | integer | yes | Author user ID |
| `status` | string | no | Article status |
| `pinned` | boolean | no | Whether article is pinned |
| `sort_order` | integer | no | Article sort order for positioning |
| `published_at` | string (date-time) | no | Publication timestamp |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `article` | KnowledgebaseArticle |  |

```bash
curl -X PUT "$PANEL_URL/api/admin/knowledgebase/articles" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"category_id":0,"title":"","slug":"","icon":"","content":"","author_id":0,"status":"","pinned":false,"sort_order":0,"published_at":""}'
```

Plugin events: [`featherpanel:admin:knowledgebase:article:created`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-article-created)

Responses: `201` Article created successfully · `400` Bad request - Validation errors · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `500` Internal server error

### PATCH `/api/admin/knowledgebase/articles/{id}`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.edit`
- Route name: `admin-knowledgebase-articles-update`
- Controller: [`KnowledgebaseController::articlesUpdate`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L143)

**Update knowledgebase article** Update an existing knowledgebase article. Only provided fields will be updated.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |

Request body: [`KnowledgebaseArticleUpdate`](https://featherpanel.com/docs/api/schemas/#schema-knowledgebasearticleupdate) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | integer | no | Category ID |
| `title` | string | no | Article title |
| `slug` | string | no | Article slug |
| `icon` | string | no | Article icon/logo URL |
| `content` | string | no | Article content |
| `author_id` | integer | no | Author user ID |
| `status` | string | no | Article status |
| `pinned` | boolean | no | Whether article is pinned |
| `sort_order` | integer | no | Article sort order for positioning |
| `published_at` | string (date-time) | no | Publication timestamp |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `article` | KnowledgebaseArticle |  |

```bash
curl -X PATCH "$PANEL_URL/api/admin/knowledgebase/articles/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"category_id":0,"title":"","slug":"","icon":"","content":"","author_id":0,"status":"","pinned":false,"sort_order":0,"published_at":""}'
```

Plugin events: [`featherpanel:admin:knowledgebase:article:updated`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-article-updated)

Responses: `200` Article updated successfully · `400` Bad request - Validation errors · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article not found · `500` Internal server error

### DELETE `/api/admin/knowledgebase/articles/{id}`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.delete`
- Route name: `admin-knowledgebase-articles-delete`
- Controller: [`KnowledgebaseController::articlesDelete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L160)

**Delete knowledgebase article** Permanently delete a knowledgebase article. This will also delete all tags and attachments.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `message` | string | Success message |

```bash
curl -X DELETE "$PANEL_URL/api/admin/knowledgebase/articles/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:article:deleted`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-article-deleted)

Responses: `200` Article deleted successfully · `400` Bad request - Invalid article ID · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article not found · `500` Internal server error

### POST `/api/admin/knowledgebase/articles/reorder`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.edit`
- Route name: `admin-knowledgebase-articles-reorder`
- Controller: [`KnowledgebaseController::articlesReorder`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L177)

**Reorder knowledgebase articles** Update the sort order of multiple articles at once for custom positioning.

Request body: [`KnowledgebaseArticleReorder`](https://featherpanel.com/docs/api/schemas/#schema-knowledgebasearticlereorder) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `articles` | object\[\] | yes | Array of articles with their new sort orders |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `message` | string | Success message |

```bash
curl -X POST "$PANEL_URL/api/admin/knowledgebase/articles/reorder" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"articles":[]}'
```

Plugin events: [`featherpanel:admin:knowledgebase:articles:reordered`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-articles-reordered)

Responses: `200` Articles reordered successfully · `400` Bad request - Invalid request data · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `500` Internal server error

### POST `/api/admin/knowledgebase/upload-icon`

- Auth: Admin
- Permission: `admin.knowledgebase.categories.create`
- Route name: `admin-knowledgebase-upload-icon`
- Controller: [`KnowledgebaseController::uploadIcon`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L191)

**Upload icon for category or article** Upload an icon image file for knowledgebase categories or articles. Supports JPG, PNG, GIF, and WebP formats with a maximum size of 5MB.

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `icon` | string (binary) | yes | Icon image file (JPG, PNG, GIF, WebP, max 5MB) |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `url` | string | Public URL of the uploaded icon |
| `filename` | string | Filename of the uploaded icon |

```bash
curl -X POST "$PANEL_URL/api/admin/knowledgebase/upload-icon" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -F "icon=@./file"
```

Plugin events: [`featherpanel:admin:knowledgebase:icon:uploaded`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-icon-uploaded)

Responses: `201` Icon uploaded successfully · `400` Bad request - No file provided, invalid file type, or file too large · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `500` Internal server error - Failed to save file

### POST `/api/admin/knowledgebase/articles/{id}/upload-attachment`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.edit`
- Route name: `admin-knowledgebase-articles-upload-attachment`
- Controller: [`KnowledgebaseController::uploadAttachment`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L203)

**Upload attachment for article** Upload an attachment file for a knowledgebase article. Supports various file types with a maximum size of 50MB.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string (binary) | yes | Attachment file (max 50MB) |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `attachment` | object | Attachment record |

```bash
curl -X POST "$PANEL_URL/api/admin/knowledgebase/articles/$ID/upload-attachment" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -F "file=@./file"
```

Plugin events: [`featherpanel:admin:knowledgebase:attachment:uploaded`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-attachment-uploaded)

Responses: `201` Attachment uploaded successfully · `400` Bad request - No file provided, invalid file type, or file too large · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article not found · `500` Internal server error - Failed to save file

### GET `/api/admin/knowledgebase/articles/{id}/attachments`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.view`
- Route name: `admin-knowledgebase-articles-attachments`
- Controller: [`KnowledgebaseController::getAttachments`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L220)

**Get all attachments for an article** Retrieve all attachments for a specific knowledgebase article.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `attachments` | object\[\] |  |

```bash
curl -X GET "$PANEL_URL/api/admin/knowledgebase/articles/$ID/attachments" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:attachments:retrieved`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-attachments-retrieved)

Responses: `200` Attachments retrieved successfully · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article not found

### DELETE `/api/admin/knowledgebase/articles/{id}/attachments/{attachmentId}`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.edit`
- Route name: `admin-knowledgebase-articles-delete-attachment`
- Controller: [`KnowledgebaseController::deleteAttachment`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L236)

**Delete an attachment** Permanently delete an attachment from a knowledgebase article.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |
| `attachmentId` | path | integer | yes | Attachment ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `message` | string | Success message |

```bash
curl -X DELETE "$PANEL_URL/api/admin/knowledgebase/articles/$ID/attachments/$ATTACHMENT_ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:attachment:deleted`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-attachment-deleted)

Responses: `200` Attachment deleted successfully · `400` Bad request - Invalid attachment ID · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article or attachment not found · `500` Internal server error

### GET `/api/admin/knowledgebase/articles/{id}/tags`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.view`
- Route name: `admin-knowledgebase-articles-tags`
- Controller: [`KnowledgebaseController::getTags`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L259)

**Get all tags for an article** Retrieve all tags associated with a specific knowledgebase article.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `tags` | object\[\] |  |

```bash
curl -X GET "$PANEL_URL/api/admin/knowledgebase/articles/$ID/tags" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:tags:retrieved`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-tags-retrieved)

Responses: `200` Tags retrieved successfully · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article not found

### POST `/api/admin/knowledgebase/articles/{id}/tags`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.edit`
- Route name: `admin-knowledgebase-articles-create-tag`
- Controller: [`KnowledgebaseController::createTag`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L275)

**Add a tag to an article** Add a new tag to a knowledgebase article.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `tag_name` | string | yes | Tag name |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `tag` | object |  |

```bash
curl -X POST "$PANEL_URL/api/admin/knowledgebase/articles/$ID/tags" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"tag_name":""}'
```

Plugin events: [`featherpanel:admin:knowledgebase:tag:created`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-tag-created)

Responses: `201` Tag added successfully · `400` Bad request - Validation errors · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article not found · `409` Tag already exists for this article

### DELETE `/api/admin/knowledgebase/articles/{id}/tags/{tagId}`

- Auth: Admin
- Permission: `admin.knowledgebase.articles.edit`
- Route name: `admin-knowledgebase-articles-delete-tag`
- Controller: [`KnowledgebaseController::deleteTag`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/KnowledgebaseController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/knowledgebase.php#L292)

**Delete a tag from an article** Remove a tag from a knowledgebase article.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Article ID |
| `tagId` | path | integer | yes | Tag ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `message` | string | Success message |

```bash
curl -X DELETE "$PANEL_URL/api/admin/knowledgebase/articles/$ID/tags/$TAG_ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:admin:knowledgebase:tag:deleted`](https://featherpanel.com/docs/plugins/events/knowledgebase/#knowledgebase-tag-deleted)

Responses: `200` Tag deleted successfully · `400` Bad request - Invalid tag ID · `401` Unauthorized · `403` Forbidden - Insufficient permissions · `404` Article or tag not found · `500` Internal server error
