> 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 Note

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

Edit a note's text, pin or unpin it, or both. Send at least one of `body` and `isPinned`.
Works for notes on projects, opportunities, accounts, work orders and files.

* **Edit the text** with `body`. The note being edited must be authored by the connected user.
* **Pin or unpin** with `isPinned`: `true` pins the note and `false` unpins it. Pinning an already-pinned note is a no-op that returns `200`. Pinning and unpinning only need access to view the note, not authorship.
* Sending both makes both changes in the same request.

Note lists stay newest-first, so pinning does not reorder them. To show pinned notes on top, sort the list by `isPinned` and then `pinnedAt` on your side. Every note response includes `isPinned` and `pinnedAt`.

**Note:** The following legacy paths will continue to work until users are notified and migrated to the new naming:

* `/projects/{projectId}/comments/{commentId}`
* `/requests/{requestId}/comments/{commentId}`
* `/clients/{clientId}/comments/{commentId}`

Reference: https://docs.coperniq.io/api-reference/notes/update-note

## Authentication

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

## Request

### Path parameters

- `note_id` (string, required)

### Body (application/json)

This endpoint expects a NoteUpdate.

- `body` (string, optional) — Updated note text content. Omit to leave the text unchanged. Mention (@) tokens are supported in the body string using the format `[Display Name|~id:USER_ID]` (users), `[Team Name|~team:TEAM_ID]` (teams, notifies all members), or `[Name|~agent:slug]` (AI agents). The display-name portion is cosmetic; the trailing token drives the mention. A valid mention creates a feed notification for the mentioned recipient(s). The author is excluded from their own mention notifications.
- `isPinned` (boolean, optional) — `true` pins the note, `false` unpins it. Pinning an already-pinned note is a no-op. Omit to leave the pin unchanged.

## Response

### 200

Note updated successfully

- `id` (integer, required) — Note identifier
- `note` (string, required) — Note text content
- `createdAt` (string, required) — Creation timestamp
- `updatedAt` (string, required) — Last update timestamp
- `isPinned` (boolean, required) — Whether the note is pinned.
- `pinnedAt` (string, required, nullable) — When the note was pinned. `null` when the note is not pinned.
- `author` (NoteAuthor, optional)

## 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

### NoteAuthor

- `id` (integer, optional) — Author identifier
- `firstName` (string, optional) — Author first name
- `lastName` (string, optional) — Author last name
- `email` (string, optional) — Author email
- `phone` (string, optional) — Author phone
- `avatarUrl` (string, optional) — Author avatar URL

## Examples

### Unpin a note

**Request**

```json
{
  "isPinned": false
}
```

**Response**

```json
{
  "id": 1,
  "note": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "isPinned": true,
  "pinnedAt": "2024-01-15T09:30:00Z",
  "author": {
    "id": 1,
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string",
    "avatarUrl": "string"
  }
}
```

**SDK Code**

```python Unpin a note
import requests

url = "https://api.coperniq.io/v1/notes/note_id"

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

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

print(response.json())
```

```javascript Unpin a note
const url = 'https://api.coperniq.io/v1/notes/note_id';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"isPinned":false}'
};

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

```go Unpin a note
package main

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

func main() {

	url := "https://api.coperniq.io/v1/notes/note_id"

	payload := strings.NewReader("{\n  \"isPinned\": false\n}")

	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 Unpin a note
require 'uri'
require 'net/http'

url = URI("https://api.coperniq.io/v1/notes/note_id")

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 = "{\n  \"isPinned\": false\n}"

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

```java Unpin a note
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Unpin a note
using RestSharp;

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

```swift Unpin a note
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/notes/note_id")! 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()
```

### Edit the text and pin in one request

**Request**

```json
{
  "body": "Panel alignment verified. Ready for inspection.",
  "isPinned": true
}
```

**Response**

```json
{
  "id": 1,
  "note": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "isPinned": true,
  "pinnedAt": "2024-01-15T09:30:00Z",
  "author": {
    "id": 1,
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string",
    "avatarUrl": "string"
  }
}
```

**SDK Code**

```python Edit the text and pin in one request
import requests

url = "https://api.coperniq.io/v1/notes/note_id"

payload = {
    "body": "Panel alignment verified. Ready for inspection.",
    "isPinned": True
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Edit the text and pin in one request
const url = 'https://api.coperniq.io/v1/notes/note_id';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"body":"Panel alignment verified. Ready for inspection.","isPinned":true}'
};

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

```go Edit the text and pin in one request
package main

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

func main() {

	url := "https://api.coperniq.io/v1/notes/note_id"

	payload := strings.NewReader("{\n  \"body\": \"Panel alignment verified. Ready for inspection.\",\n  \"isPinned\": true\n}")

	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 Edit the text and pin in one request
require 'uri'
require 'net/http'

url = URI("https://api.coperniq.io/v1/notes/note_id")

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 = "{\n  \"body\": \"Panel alignment verified. Ready for inspection.\",\n  \"isPinned\": true\n}"

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

```java Edit the text and pin in one request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.coperniq.io/v1/notes/note_id")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"Panel alignment verified. Ready for inspection.\",\n  \"isPinned\": true\n}")
  .asString();
```

```php Edit the text and pin in one request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.coperniq.io/v1/notes/note_id', [
  'body' => '{
  "body": "Panel alignment verified. Ready for inspection.",
  "isPinned": true
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Edit the text and pin in one request
using RestSharp;

var client = new RestClient("https://api.coperniq.io/v1/notes/note_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"Panel alignment verified. Ready for inspection.\",\n  \"isPinned\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Edit the text and pin in one request
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": "Panel alignment verified. Ready for inspection.",
  "isPinned": true
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/notes/note_id")! 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()
```

### Example 3

**Request**

```json
{
  "isPinned": true
}
```

**Response**

```json
{
  "id": 1,
  "note": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "isPinned": true,
  "pinnedAt": "2024-01-15T09:30:00Z",
  "author": {
    "id": 1,
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string",
    "avatarUrl": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.coperniq.io/v1/notes/note_id"

payload = { "isPinned": True }
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/notes/note_id';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"isPinned":true}'
};

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/notes/note_id"

	payload := strings.NewReader("{\n  \"isPinned\": true\n}")

	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/notes/note_id")

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 = "{\n  \"isPinned\": true\n}"

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/notes/note_id")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"isPinned\": true\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/notes/note_id")! 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()
```