---
title: Create Project
protocol: rest
method: POST
endpoint: /v1/projects
description: "Create a new documentation project"
---

# Create Project

Create a new documentation project in your organization.

<Endpoint method="POST" path="/v1/projects" />

## Request Body

<ParamField body="name" type="string" required>
  Project display name. Used in the dashboard and as the default site title.
</ParamField>

<ParamField body="slug" type="string">
  URL-friendly identifier. Auto-generated from `name` if not provided. Used in the docs URL: `{slug}-docs.syntext.dev`.
</ParamField>

<ParamField body="description" type="string">
  Brief project description. Shown in the dashboard.
</ParamField>

<ParamField body="repoUrl" type="string">
  GitHub repository URL to connect. Example: `https://github.com/acme/docs`.
</ParamField>

<ParamField body="repoBranch" type="string" default="main">
  Branch to build from. Defaults to `main`.
</ParamField>

<ParamField body="settings" type="object">
  Project settings.

  <Expandable title="properties">
    <ParamField body="settings.aiEnabled" type="boolean" default="true">
      Enable AI assistant for this project.
    </ParamField>

    <ParamField body="settings.searchEnabled" type="boolean" default="true">
      Enable full-text search.
    </ParamField>

    <ParamField body="settings.analyticsEnabled" type="boolean" default="true">
      Enable usage analytics.
    </ParamField>
  </Expandable>
</ParamField>

## Response

Returns the created project object.

## Example

<CodeGroup>
```bash cURL
curl -X POST https://api.syntext.dev/v1/projects \
  -H "Authorization: Bearer stx_abc12345_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "API Documentation",
    "description": "REST API reference for our platform",
    "repoUrl": "https://github.com/acme/api-docs",
    "repoBranch": "main"
  }'
```

```typescript SDK
import { Syntext } from '@syntext/sdk'

const client = new Syntext('stx_abc12345_...')

const project = await client.projects.create({
  name: 'API Documentation',
  description: 'REST API reference for our platform',
  repoUrl: 'https://github.com/acme/api-docs',
  repoBranch: 'main',
})
```

```python Python
from syntext import Syntext

client = Syntext("stx_abc12345_...")

project = client.projects.create(
    name="API Documentation",
    description="REST API reference for our platform",
    repo_url="https://github.com/acme/api-docs",
    repo_branch="main",
)
```
</CodeGroup>

### Response

```json
{
  "data": {
    "id": "prj_xyz789",
    "name": "API Documentation",
    "slug": "api-documentation",
    "description": "REST API reference for our platform",
    "url": "https://api-documentation-docs.syntext.dev",
    "repoUrl": "https://github.com/acme/api-docs",
    "repoBranch": "main",
    "settings": {
      "aiEnabled": true,
      "searchEnabled": true,
      "analyticsEnabled": true
    },
    "createdAt": "2026-06-28T10:30:00Z",
    "updatedAt": "2026-06-28T10:30:00Z"
  }
}
```

## Error Responses

### 400 Bad Request

Returned when required fields are missing or have invalid values.

```json
{
  "error": {
    "code": "invalid_request",
    "message": "Required field missing or invalid value",
    "details": {
      "field": "name",
      "issue": "Name is required"
    }
  }
}
```

### 409 Conflict

Returned when a project with this slug already exists.

```json
{
  "error": {
    "code": "conflict",
    "message": "Project with this slug already exists"
  }
}
```

### 402 Payment Required

Returned when the organization has reached its project limit.

```json
{
  "error": {
    "code": "quota_exceeded",
    "message": "Organization has reached project limit. Upgrade your plan to create more projects."
  }
}
```
