# Create knowledge base item

URL: /en/docs/api/v1/knowledge-base/post
Last Updated: 2026-07-30T21:15:44.949Z

## Description
No description available.

## Available Actions
- Execute POST request
- View request parameters
- View response schema
- Get code examples
- Navigate to related topics
- View step-by-step instructions
- Get best practices

## Content
### POST /api/v1/knowledge-base

**Create knowledge base item**

Create a new base-locale Q&A item in the knowledge base with question, answer, access level, and optional tags. Localized versions can be added after creation through the item detail endpoint.

**Authentication:** Bearer token (`Authorization: Bearer <token>`)

**Request body** (`application/json`) - required:

- `question` (string, required): The base-locale question being answered
- `answer` (string, required): Answer content. Supports Markdown.
- `answer_md` (string): Optional markdown answer content when stored separately.
- `access_level` (enum: public | restricted | internal | requires_nda, required): Access level for this Q&A item
- `tags` (array of string): Tags for categorization
- `variant_options` (array of string (uuid)): Variant option IDs to assign to this item (default locale only).

Example (Public Q&A item):

```json
{
  "question": "What is our data retention policy?",
  "answer": "We retain customer data for **7 years** as required by law.",
  "answer_md": "We retain customer data for **7 years** as required by law.",
  "access_level": "public",
  "tags": [
    "gdpr",
    "data-retention",
    "legal"
  ]
}
```

Example (Restricted security Q&A):

```json
{
  "question": "What encryption standards do you use?",
  "answer": "We use **AES-256** encryption for data at rest and **TLS 1.3** for data in transit.",
  "answer_md": "We use **AES-256** encryption for data at rest and **TLS 1.3** for data in transit.",
  "access_level": "restricted",
  "tags": [
    "security",
    "encryption"
  ]
}
```

Example (Simple Q&A without tags):

```json
{
  "question": "How do I reset my password?",
  "answer": "Click the 'Forgot Password' link on the login page and follow the instructions.",
  "access_level": "public"
}
```

**Responses:**

- `201` - Knowledge base item created successfully
  - `success` (boolean, required)
  - `data` (object, required)
    - `qna` (KnowledgeBaseItem (object), required)
      - `id` (string (uuid)): Unique knowledge base item identifier
      - `question` (string): The base-locale question being answered
      - `answer` (string): Answer content. Supports Markdown.
      - `answer_md` (string): Markdown answer content when stored separately from the plain answer.
      - `access_level` (enum: public | restricted | internal | requires_nda): Access level for this Q&A item
      - `tags` (array of string): Tags for categorization
      - `date_created` (string (date-time)): Creation timestamp
      - `date_updated` (string (date-time)): Last update timestamp

  Example (Created Q&A item):
  
  ```json
  {
  "success": true,
  "data": {
    "qna": {
      "id": "kb-123",
      "question": "What data do you collect?",
      "answer": "We collect only necessary personal information as outlined in our privacy policy.",
      "access_level": "public",
      "tags": [
        "privacy"
      ]
    }
  }
}
  ```
- `400` - Bad Request - validation failed
  - `error` (string): Validation error message
- `401` - Unauthorized
- `403` - Forbidden - insufficient permissions to create knowledge base items
  - `error` (string)
- `409` - Conflict - similar knowledge base question already exists
  - `error` (string)
- `500` - Internal server error

**Code samples:**

cURL:

```bash
curl -X POST "https://app.orbiqhq.com/api/v1/knowledge-base" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What data do you collect?",
    "answer": "We collect only necessary personal information as outlined in our privacy policy.",
    "access_level": "public",
    "tags": ["privacy"]
  }'
```

Fetch:

```JavaScript
const response = await fetch("https://app.orbiqhq.com/api/v1/knowledge-base", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${accessToken}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    question: "What data do you collect?",
    answer: "We collect only necessary personal information as outlined in our privacy policy.",
    access_level: "public",
    tags: ["privacy"],
  }),
});

const result = await response.json();
```

requests:

```Python
import requests

response = requests.post(
    "https://app.orbiqhq.com/api/v1/knowledge-base",
    headers={
        "Authorization": f"Bearer {access_token}",
        "Content-Type": "application/json",
    },
    json={
        "question": "What data do you collect?",
        "answer": "We collect only necessary personal information as outlined in our privacy policy.",
        "access_level": "public",
        "tags": ["privacy"],
    },
)
result = response.json()
```

