> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nulix.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Nulix REST API: Programmatic Knowledge Base Access

> Use the Nulix REST API to read, create, update, and delete articles and categories programmatically from any application or script.

The Nulix REST API gives you full programmatic control over your knowledge base. Use it to pull articles into your product's help widget, automate content creation from external systems, build custom search experiences, or integrate Nulix data into your own dashboards and tooling. The API follows standard REST conventions and returns JSON for all responses.

## Getting an API Key

Before you can make API requests, generate a personal API key from your workspace settings.

**1. Open API Settings**

In your Nulix workspace, navigate to **Settings > API**.

**2. Generate a New Key**

Click **Generate API Key**. Give the key a descriptive name (for example, `production-app` or `zapier-integration`) so you can identify it later.

**3. Copy and Store the Key Securely**

Copy the key immediately — Nulix only displays it once. Store it in a secrets manager, an environment variable, or a password manager. Never commit API keys to source control.

> [!NOTE]
>
> Keep your API keys secret and rotate them regularly, especially if you suspect a key has been exposed. You can revoke and regenerate keys at any time from **Settings > API**.

## Authentication

Pass your API key as a Bearer token in the `Authorization` header on every request:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

Requests without a valid key return a `401 Unauthorized` response.

## Base URL

All API endpoints are relative to the following base URL:

```
https://api.nulix.io/v1
```

## Endpoints

The table below summarises the available endpoints. All endpoints require authentication unless otherwise noted.

| Method | Path | Description |
| - | - | - |
| `GET` | `/articles` | List all published articles in your knowledge base |
| `GET` | `/articles/{id}` | Retrieve a single article by its unique ID |
| `POST` | `/articles` | Create a new article |
| `PUT` | `/articles/{id}` | Update an existing article |
| `DELETE` | `/articles/{id}` | Permanently delete an article |
| `GET` | `/categories` | List all categories |
| `GET` | `/search?q={query}` | Search articles by keyword or phrase |
| `POST` | `/webhooks` | Register a new webhook endpoint programmatically |

## Example: List Articles

### Request

```bash theme={null}
curl https://api.nulix.io/v1/articles \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "data": [
    {
      "id": "art_abc123",
      "title": "Getting Started with Nulix",
      "slug": "getting-started-with-nulix",
      "category_id": "cat_xyz456",
      "published_at": "2024-05-15T09:30:00Z"
    },
    {
      "id": "art_def456",
      "title": "How to Manage Team Members",
      "slug": "how-to-manage-team-members",
      "category_id": "cat_xyz456",
      "published_at": "2024-05-20T14:00:00Z"
    },
    {
      "id": "art_ghi789",
      "title": "Setting Up a Custom Domain",
      "slug": "setting-up-a-custom-domain",
      "category_id": "cat_abc789",
      "published_at": "2024-05-28T11:15:00Z"
    }
  ],
  "meta": {
    "total": 3,
    "page": 1,
    "per_page": 20
  }
}
```

## Example: Create an Article

Use `POST /articles` to create a new article programmatically. Pass a JSON body with the article's `title`, `body` (Markdown), and `category_id`.

### Request

```bash theme={null}
curl -X POST https://api.nulix.io/v1/articles \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "How to Reset Your Password",
    "body": "## Overview\n\nFollow these steps to reset your password and regain access to your account.\n\n1. Click **Forgot password** on the login page.\n2. Enter your email address and click **Send Reset Link**.\n3. Open the email and click the reset link.\n4. Choose a new password and confirm it.",
    "category_id": "cat_xyz456"
  }'
```

### Response

```json theme={null}
{
  "data": {
    "id": "art_new123",
    "title": "How to Reset Your Password",
    "slug": "how-to-reset-your-password",
    "category_id": "cat_xyz456",
    "status": "draft",
    "created_at": "2024-06-10T08:00:00Z",
    "published_at": null
  }
}
```

New articles are created as **drafts** by default. Publish them from the Nulix editor or by sending a `PUT /articles/{id}` request with `"status": "published"`.

## Example: Search Articles

Use `GET /search?q=` to run a full-text search across all published articles. This is the same index that powers the in-app search bar.

### Request

```bash theme={null}
curl "https://api.nulix.io/v1/search?q=reset+password" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "data": [
    {
      "id": "art_new123",
      "title": "How to Reset Your Password",
      "slug": "how-to-reset-your-password",
      "category_id": "cat_xyz456",
      "excerpt": "Follow these steps to reset your password and regain access to your account.",
      "published_at": "2024-06-10T09:00:00Z"
    }
  ],
  "meta": {
    "total": 1,
    "query": "reset password"
  }
}
```

> [!TIP]
>
> URL-encode your query string when passing multi-word searches. Most HTTP clients handle this automatically, but be explicit when building URLs manually (for example, use `%20` or `+` to represent spaces).

## Rate Limits

To ensure reliable service for all users, the API enforces the following request rate limits:

| Plan | Rate Limit |
| - | - |
| Pro | 1,000 requests per hour |
| Enterprise | 5,000 requests per hour |

When you exceed your rate limit, the API returns a `429 Too Many Requests` response. The response includes a `Retry-After` header indicating how many seconds to wait before retrying.

> [!TIP]
>
> Use the API to sync Nulix articles into your app's in-app help widget. Fetch articles by category, cache them on your end, and display contextually relevant results to users without leaving your product.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.