# Add New Group

`POST /api/knowledge_base/groups`



- **Group:** Knowledge Base
- **Since:** v3.0.0
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/knowledge-base/post-kb-group/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | String | **required** | Group name (slug auto-generated, unique). |
| `description` | String | optional | Group description. |
| `color` | String | optional | Group color. (default: `#28B8DA`) |

## Example request

```bash
curl -X POST "https://yoursite.com/api/knowledge_base/groups" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "..." }'
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
  "status": true,
  "message": "Group added successfully",
  "record_id": 3
}
```

## Error responses

### Error-Response:

```json
HTTP/1.1 422 Unprocessable Entity
{
  "status": false,
  "error": "validation_failed",
  "message": "Group validation failed",
  "errors": {
    "name": "The name field is required."
  }
}
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
