> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.coperniq.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.coperniq.io/_mcp/server.

# Update Project

PATCH https://api.coperniq.io/v1/projects/{project_id}
Content-Type: application/json

Update an existing project. Supports partial updates.

Updatable fields:
- Standard fields (value, size, status, etc.)
- Workflow fields (workflowId, phaseId)
- Contact information (primaryEmail, primaryPhone)
- Contacts (contact IDs only, no name, email, phone, etc.)
- Custom fields (through custom object)

Note: Updates are atomic - either all fields update or none do.

> **Changing account association is not supported via update.** To move a project to a different account, delete and re-create it under the new account.


Reference: https://docs.coperniq.io/api-reference/projects/update-project

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `project_id` (integer, required) — Project identifier

### Query parameters

- `allow_new_options` (boolean, optional, default: false) — Whether to allow creation of new dropdown options during record creation

### Body (application/json)

This endpoint expects a ProjectUpdate.

- `title` (string, optional) — Project title/name
- `description` (string, optional, nullable) — Project description
- `address` (list of string, optional) — An array containing a single string, which represents the full project location/address.
- `trades` (list of enum, optional) — Array of trade types
  - Allowed values: `EV Charger`, `Solar`, `Storage`, `Boiler`, `Chiller`, `Ductwork`, `HVAC`, `Refrigeration`, `Electrical`, `Generator`, `Lighting`, `Gas Line`, `Plumbing`, `Water Filtration`, `Water Heater`, `Communications`, `Electronic Safety & Security`, `Integrated Automation`, `Insulation`, `Gutters`, `Roofing`, `Siding`, `Windows`, `Drywall`, `General Contracting`, `Home Improvement`, `Landscaping`, `R&R (Remove & Reinstall)`, `Tenant Improvement`, `Tree Cutting`
- `workflowId` (integer, optional) — ID of associated workflow
- `phaseId` (integer, optional, nullable) — ID of associated phase template
- `ownerId` (integer, optional, nullable) — ID of the owning user
- `salesRepId` (integer, optional, nullable) — ID of the assigned sales rep
- `projectManagerId` (integer, optional, nullable) — ID of the assigned project manager
- `value` (double, optional) — Project value
- `size` (double, optional) — Project size
- `status` (enum, optional) — Status of the project: * `ACTIVE` - Project is active and in progress * `ON_HOLD` - Project is temporarily paused * `CANCELLED` - Project has been cancelled * `COMPLETED` - Project has been completed
  - Allowed values: `ACTIVE`, `ON_HOLD`, `CANCELLED`, `COMPLETED`
- `primaryEmail` (string, optional) — Primary contact email
- `primaryPhone` (string, optional) — Primary contact phone
- `contacts` (list of integer, optional) — Contact IDs only (no name, email, phone, etc.). The contacts must be created first via POST /contacts. The first ID in the array is treated as the primary contact.
- `custom` (map from string to any, optional) — Custom fields

## Response

### 200

Project updated successfully

- `id` (integer, optional) — Unique identifier
- `createdAt` (string, optional) — Creation timestamp
- `updatedAt` (string, optional) — Timestamp of the most recent update to the record, including changes to its custom property values.
- `title` (string, optional) — Record title/name
- `description` (string, optional, nullable) — Record description
- `address` (list of string, optional) — Record location/address
- `isActive` (boolean, optional) — Whether the record is active
- `primaryEmail` (string, optional, nullable) — Primary contact email
- `primaryPhone` (string, optional, nullable) — Primary contact phone
- `number` (integer, optional) — Record number (e.g., 1234)
- `createdBy` (UserSummary, optional, nullable) — User who created the record. Null when the record was created by a non-user actor (e.g. automation or a contact).
- `updatedBy` (UserSummary, optional, nullable) — User who last edited a field on the record, derived from the changelog. Null when the record has never been edited or the last edit was made by a non-user actor. Returned by single-record GET only; list and search responses omit it.
- `custom` (map from string to any, optional) — Custom fields
- `trades` (list of enum, optional) — Array of trade types
  - Allowed values: `EV Charger`, `Solar`, `Storage`, `Boiler`, `Chiller`, `Ductwork`, `HVAC`, `Refrigeration`, `Electrical`, `Generator`, `Lighting`, `Gas Line`, `Plumbing`, `Water Filtration`, `Water Heater`, `Communications`, `Electronic Safety & Security`, `Integrated Automation`, `Insulation`, `Gutters`, `Roofing`, `Siding`, `Windows`, `Drywall`, `General Contracting`, `Home Improvement`, `Landscaping`, `R&R (Remove & Reinstall)`, `Tenant Improvement`, `Tree Cutting`
- `value` (double, optional, nullable) — Project value
- `size` (double, optional, nullable) — Project size
- `workflowId` (integer, optional, nullable) — Associated workflow ID
- `accountId` (integer, optional, nullable) — Associated account ID
- `ownerId` (integer, optional, nullable) — ID of the owning user
- `salesRepId` (integer, optional, nullable) — ID of the assigned sales rep
- `projectManagerId` (integer, optional, nullable) — ID of the assigned project manager
- `projectManager` (ProjectProjectManager, optional, nullable) — Assigned project manager, `null` when unset. Same shape as `owner` and `salesRep`.
- `status` (enum, optional) — Status of the project: * `ACTIVE` - Project is active and in progress * `ON_HOLD` - Project is temporarily paused * `CANCELLED` - Project has been cancelled * `COMPLETED` - Project has been completed
  - Allowed values: `ACTIVE`, `ON_HOLD`, `CANCELLED`, `COMPLETED`
- `stage` (ProjectStage, optional) — Current stage information (Workflows 1.0). This object is present only for records still using the original Stage-based workflow engine. When the project is managed by Workflows 2.0 (Phase engine) the `stage` object and related fields (`stageId`, `timeInStageDays`, `slaStatus`) are omitted.
- `phase` (ProjectPhase, optional) — Current phase information (Workflows 2.0). This object replaces `stage` when a project is attached to the Phase-based workflow engine. If the project is still on Workflows 1.0 this object will be omitted. Only populated on GET (list, search, get by id) — omitted on create/update responses.
- `phaseTimeline` (list of ProjectPhaseTimelineItems, optional) — Only present on `GET /projects` and `/projects/search` when `entered_phase_id`/`exited_phase_id` is used to filter the results. Contains the project's full phase-transition history (not just the matched phase) in compact form — use `GET /projects/{project_id}` for the complete `phaseInstances` with names, positions, and SLA info.
- `lineItemsUpdatedAt` (string, optional, nullable) — Only present on `GET /projects` and `/projects/search` when `include_line_item_updates=true` is passed together with `updated_after` and/or `updated_before`. The most recent `updatedAt` among the project's own scope line items (estimate/scope items; line items on quotes/invoices are excluded). `null` if the project has no scope line items. Useful for telling whether a row matched the date window via its own `updatedAt` or via a line item edit.
- `workflowName` (string, optional) — Name of the associated workflow.
- `contacts` (list of ContactRef, optional) — Contacts associated with this project (independent of, and not inherited from, the parent account's contacts). Set on create or update via the `contacts` request field. On GET requests, only populated when include_contacts=true is passed. Always populated on POST (create) and PATCH (update) responses. Ordered with the primary contact first, capped at 20 contacts.

## Errors

### 400 Bad Request Error

Invalid request

- `message` (string, optional)
- `code` (enum, optional)
  - Allowed values: `NOT_FOUND`
- `field` (string, optional) — Field that caused the validation error (if applicable)

### 401 Unauthorized Error

Authentication failed

- `message` (string, optional)
- `code` (enum, optional)
  - Allowed values: `NOT_FOUND`

### 404 Not Found Error

Resource not found

- `message` (string, optional)
- `code` (enum, optional)
  - Allowed values: `NOT_FOUND`

## Types

### UserSummary

Minimal user representation used in responses

- `id` (integer, optional)
- `firstName` (string, optional, nullable)
- `lastName` (string, optional, nullable)
- `email` (string, optional, nullable)
- `avatarUrl` (string, optional, nullable)

### ProjectProjectManager

Assigned project manager, `null` when unset. Same shape as `owner` and `salesRep`.

- `id` (integer, optional)
- `firstName` (string, optional)
- `lastName` (string, optional)

### ProjectStage

Current stage information (Workflows 1.0). This object is present only for records still using the original Stage-based workflow engine. When the project is managed by Workflows 2.0 (Phase engine) the `stage` object and related fields (`stageId`, `timeInStageDays`, `slaStatus`) are omitted.

- `id` (integer, optional) — Stage identifier
- `name` (string, optional) — Stage name
- `type` (string, optional) — Stage type
- `scope` (string, optional) — Stage scope
- `redSla` (integer, optional) — Red SLA threshold in days
- `yellowSla` (integer, optional) — Yellow SLA threshold in days
- `timeInStageDays` (integer, optional) — Number of days in current stage
- `slaStatus` (enum, optional) — Current SLA violation status
  - Allowed values: `VIOLATED`, `NON_VIOLATED`

### ProjectPhase

Current phase information (Workflows 2.0). This object replaces `stage` when a project is attached to the Phase-based workflow engine. If the project is still on Workflows 1.0 this object will be omitted. Only populated on GET (list, search, get by id) — omitted on create/update responses.

- `instanceId` (integer, optional) — Phase instance identifier
- `templateId` (integer, optional) — Phase template identifier
- `name` (string, optional) — Phase name
- `status` (string, optional) — Current phase status
- `type` (string, optional) — Phase type
- `redSla` (integer, optional) — Red SLA threshold in days (from template)
- `yellowSla` (integer, optional) — Yellow SLA threshold in days (from template)
- `timeInStageDays` (integer, optional) — Number of days in current phase (mirrors `timeInStageDays` metric)
- `slaStatus` (enum, optional) — Current SLA violation status for the phase
  - Allowed values: `VIOLATED`, `NON_VIOLATED`
- `startedAt` (string, optional, nullable) — When the current phase started. Present on `GET /projects/{project_id}` and on lists with `include_phases=true`.
- `completedAt` (string, optional, nullable) — When the current phase completed. Present on `GET /projects/{project_id}` and on lists with `include_phases=true`.

### ProjectPhaseTimelineItems

- `phaseTemplateId` (integer, optional)
- `startedAt` (string, optional, nullable) — Timestamp when the project entered this phase template
- `completedAt` (string, optional, nullable) — Timestamp when the project exited this phase template

### ContactRef

- `id` (integer, optional)
- `name` (string, optional)
- `title` (string, optional, nullable) — Contact title (e.g. job title)
- `description` (string, optional, nullable)
- `emails` (list of string, optional)
- `phones` (list of string, optional)
- `isPrimary` (boolean, optional) — True for the primary contact (the first contact in the list). At most one contact is primary.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": 1,
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "title": "string",
  "description": "string",
  "address": [
    "string"
  ],
  "isActive": true,
  "primaryEmail": "string",
  "primaryPhone": "string",
  "number": 1,
  "createdBy": {
    "id": 1,
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "avatarUrl": "string"
  },
  "updatedBy": {
    "id": 1,
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "avatarUrl": "string"
  },
  "custom": {},
  "trades": [
    "EV Charger"
  ],
  "value": 1.1,
  "size": 1.1,
  "workflowId": 1,
  "accountId": 1,
  "ownerId": 1,
  "salesRepId": 1,
  "projectManagerId": 1,
  "projectManager": {
    "id": 1,
    "firstName": "string",
    "lastName": "string"
  },
  "status": "ACTIVE",
  "stage": {
    "id": 1,
    "name": "string",
    "type": "string",
    "scope": "string",
    "redSla": 1,
    "yellowSla": 1,
    "timeInStageDays": 1,
    "slaStatus": "VIOLATED"
  },
  "phase": {
    "instanceId": 1,
    "templateId": 1,
    "name": "string",
    "status": "string",
    "type": "string",
    "redSla": 1,
    "yellowSla": 1,
    "timeInStageDays": 1,
    "slaStatus": "VIOLATED",
    "startedAt": "2024-01-15T09:30:00Z",
    "completedAt": "2024-01-15T09:30:00Z"
  },
  "phaseTimeline": [
    {
      "phaseTemplateId": 1,
      "startedAt": "2024-01-15T09:30:00Z",
      "completedAt": "2024-01-15T09:30:00Z"
    }
  ],
  "lineItemsUpdatedAt": "2024-01-15T09:30:00Z",
  "workflowName": "string",
  "contacts": [
    {
      "id": 1,
      "name": "string",
      "title": "string",
      "description": "string",
      "emails": [
        "string"
      ],
      "phones": [
        "string"
      ],
      "isPrimary": true
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.coperniq.io/v1/projects/1"

payload = {}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.coperniq.io/v1/projects/1';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.coperniq.io/v1/projects/1"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.coperniq.io/v1/projects/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.coperniq.io/v1/projects/1")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.coperniq.io/v1/projects/1', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.coperniq.io/v1/projects/1");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/projects/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```