---
title: Update Project
protocol: rest
method: PATCH
endpoint: /v1/projects/{projectId}
description: "Update an existing project"
---

# Update Project

Update settings and configuration for an existing project.

<Endpoint method="PATCH" path="/v1/projects/{projectId}" />

## Path Parameters

<ParamField path="projectId" type="string" required>
  The project ID (e.g., `prj_abc123`).
</ParamField>

## Request Body

All fields are optional. Only provided fields will be updated.

<ParamField body="name" type="string">
  Project display name.
</ParamField>

<ParamField body="description" type="string">
  Project description.
</ParamField>

<ParamField body="repoBranch" type="string">
  Branch to build from.
</ParamField>

<ParamField body="settings" type="object">
  Project settings. Partial updates supported.

  <Expandable title="properties">
    <ParamField body="settings.aiEnabled" type="boolean">
      Enable/disable AI assistant.
    </ParamField>

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

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

## Response

Returns the updated project object.

## Example

<CodeGroup>
```bash cURL
curl -X PATCH https://api.syntext.dev/v1/projects/prj_abc123 \
  -H "Authorization: Bearer stx_abc12345_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated API Docs",
    "settings": {
      "aiEnabled": false
    }
  }'
```

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

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

const project = await client.projects.update('prj_abc123', {
  name: 'Updated API Docs',
  settings: {
    aiEnabled: false,
  },
})
```

```python Python
from syntext import Syntext

client = Syntext("stx_abc12345_...")

project = client.projects.update(
    "prj_abc123",
    name="Updated API Docs",
    settings={"ai_enabled": False},
)
```
</CodeGroup>

### Response

```json
{
  "data": {
    "id": "prj_abc123",
    "name": "Updated API Docs",
    "slug": "api-docs",
    "description": "Documentation for our REST API",
    "url": "https://api-docs-docs.syntext.dev",
    "settings": {
      "aiEnabled": false,
      "searchEnabled": true,
      "analyticsEnabled": true
    },
    "createdAt": "2026-01-15T12:00:00Z",
    "updatedAt": "2026-06-28T11:00:00Z"
  }
}
```

## Error Responses

### 404 Not Found

Returned when the project does not exist.

```json
{
  "error": {
    "code": "not_found",
    "message": "Project does not exist"
  }
}
```

### 400 Bad Request

Returned when a field value is invalid.

```json
{
  "error": {
    "code": "invalid_request",
    "message": "Invalid field value",
    "details": {
      "field": "slug",
      "issue": "Slug must be URL-safe (lowercase letters, numbers, and hyphens)"
    }
  }
}
```

### 403 Forbidden

Returned when you don't have permission to update this project.

```json
{
  "error": {
    "code": "forbidden",
    "message": "You do not have permission to update this project"
  }
}
```
