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

# Update

PUT https://pre-api.joincandidhealth.com/notes/v1/{id}/{version}
Content-Type: application/json

Updates a note. The path must contain the most recent version to prevent races.

Reference: https://docs.joincandidhealth.com/api-reference/pre-encounter/notes/v-1/update

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://pre-api.joincandidhealth.com` (Production, default)
- `https://pre-api-staging.joincandidhealth.com` (Staging)
- `https://sandbox-pre-api.joincandidhealth.com` (CandidSandbox)
- `https://staging-pre-api.joincandidhealth.com` (CandidStaging)
- `http://localhost:4000` (Local)

## Request

### Path parameters

- `id` (string, required) — The unique identifier for a Note.
- `version` (string, required)

### Body (application/json)

This endpoint expects a MutableNote.

- `value` (string, required)
- `type` (enum, optional) — Defaults to GENERAL when omitted.
  - Allowed values: `GENERAL`, `ELIGIBILITY`
- `author_email` (string, optional)
- `author_name` (string, optional)

## Response

### 200

- `created_at` (datetime, required)
- `deactivated` (boolean, required) — True if the object is deactivated. Deactivated objects are not returned in search results but are returned in all other endpoints including scan.
- `id` (string, required) — The unique identifier for a Note.
- `organization_id` (string, required) — The organization that owns this object.
- `updated_at` (datetime, required)
- `updating_user_id` (string, required) — The user ID of the user who last updated the object.
- `value` (string, required)
- `version` (integer, required) — The version of the object. Any update to any property of an object object will create a new version.
- `author_email` (string, optional)
- `author_name` (string, optional)
- `type` (enum, optional) — Defaults to GENERAL when omitted.
  - Allowed values: `GENERAL`, `ELIGIBILITY`

## Examples

**Request**

```json
{
  "value": "value"
}
```

**Response**

```json
{
  "created_at": "2024-01-15T09:30:00Z",
  "deactivated": true,
  "id": "id",
  "organization_id": "organization_id",
  "updated_at": "2024-01-15T09:30:00Z",
  "updating_user_id": "updating_user_id",
  "value": "value",
  "version": 1,
  "author_email": "author_email",
  "author_name": "author_name",
  "type": "GENERAL"
}
```

**SDK Code**

```python
import requests

url = "https://pre-api.joincandidhealth.com/notes/v1/id/version"

payload = { "value": "value" }
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://pre-api.joincandidhealth.com/notes/v1/id/version';
const options = {
  method: 'PUT',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"value":"value"}'
};

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://pre-api.joincandidhealth.com/notes/v1/id/version"

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

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

	req.Header.Add("Authorization", "<token>.")
	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://pre-api.joincandidhealth.com/notes/v1/id/version")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"value\": \"value\"\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.put("https://pre-api.joincandidhealth.com/notes/v1/id/version")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"value\": \"value\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://pre-api.joincandidhealth.com/notes/v1/id/version', [
  'body' => '{
  "value": "value"
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://pre-api.joincandidhealth.com/notes/v1/id/version");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"value\": \"value\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = ["value": "value"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://pre-api.joincandidhealth.com/notes/v1/id/version")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```