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

# Update a project (requires write scope)

` PATCH /orgs/{orgId}/projects/{projectId} `

Update a project (requires write scope)

## Servers

- ` https://api.rogeriq.com/api/v1 `

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` apiKey `: ` apiKey `

  - Credential: ` X-API-Key ` in ` header `

  - API key with `riq_` prefix

## Parameters

### ` orgId ` (path, required)

- ` value `: type ` string `

### ` projectId ` (path, required)

- ` value `: type ` string `

## Request body (optional)

Content type: ` application/json `

- ` value `: type ` object `

  - ` name `: type ` string `

  - ` domain `: type ` string `

  - ` agent_mode `: type ` string `

    - enum: ` ["autopilot","copilot","assist"] `

  - ` ai_model `: type ` string `

## Responses

### ` 200 ` — Updated

Content type: ` application/json `

- ` value `: type ` object `

  - ` data `: type ` object `

    - ` id `: type ` string `

    - ` org_id `: type ` string `

    - ` name `: type ` string `

    - ` slug `: type ` string `

    - ` domain `: type ` string `; nullable

    - ` agent_mode `: type ` string `

      - enum: ` ["autopilot","copilot","assist"] `

    - ` ai_model `: type ` string `; nullable

    - ` created_at `: type ` string `; format ` date-time `

## Request examples

### cURL

```curl
curl -X PATCH 'https://api.rogeriq.com/api/v1/orgs/string/projects/string' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "domain": "string",
  "agent_mode": "autopilot",
  "ai_model": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.rogeriq.com/api/v1/orgs/string/projects/string', {
  method: 'PATCH',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "name": "string",
    "domain": "string",
    "agent_mode": "autopilot",
    "ai_model": "string"
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.patch('https://api.rogeriq.com/api/v1/orgs/string/projects/string', headers=headers, json={
  "name": "string",
  "domain": "string",
  "agent_mode": "autopilot",
  "ai_model": "string"
})
print(response.json())
```