> 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

PATCH https://api.joincandidhealth.com/api/billing_notes/v2/{billing_note_id}
Content-Type: application/json

Reference: https://docs.joincandidhealth.com/api-reference/billing-notes/v-2/update

## Authentication

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

## Servers

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

## Request

### Path parameters

- `billing_note_id` (UUID, required)

### Body (application/json)

This endpoint expects an object.

- `text` (string, required) — Empty string not allowed.

## Response

### 200

- `billing_note_id` (UUID, required)
- `created_at` (datetime, required) — An [RFC 3339, section 5.6 datetime](https://ijmacd.github.io/rfc3339-iso8601/). For example, 2017-07-21T17:32:28Z.
- `encounter_id` (UUID, required)
- `text` (string, required) — Empty string not allowed.
- `author_auth0_id` (string, optional)
- `author_name` (string, optional)
- `billing_note_metadata` (BillingNoteMetadata, optional)
- `billing_note_type` (enum, optional)
  - Allowed values: `manual`, `system`, `queue_added`, `queue_moved`, `task_created`

## Errors

### 404 Entity Not Found Error

- `errorName` ("EntityNotFoundError", required)
- `content` (EntityNotFoundErrorMessage, required)

### 400 Organization Not Authorized Error

- `errorName` ("OrganizationNotAuthorizedError", required)
- `content` (OrganizationNotAuthorizedErrorMessage, required)

### 422 HTTP Request Validation Error

- `errorName` ("HttpRequestValidationError", required)
- `content` (RequestValidationError, required)

### 422 HTTP Request Validations Error

- `errorName` ("HttpRequestValidationsError", required)
- `content` (list of RequestValidationError, required)

### 403 Unauthorized Error

- `errorName` ("UnauthorizedError", required)
- `content` (UnauthorizedErrorMessage, required)

## Types

### BillingNoteMetadata

- `type`: `queue_added`
  - `queue_id` (string, required)
  - `queue_name` (string, required)
- `type`: `queue_moved`
  - `from_queue_id` (string, required)
  - `from_queue_name` (string, required)
  - `to_queue_id` (string, required)
  - `to_queue_name` (string, required)
- `type`: `task_created`
  - `task_id` (UUID, required)
  - `task_type` (string, required)

### EntityNotFoundErrorMessage

- `id` (string, required)

### OrganizationNotAuthorizedErrorMessage

- `message` (string, required)

### RequestValidationError

- `fieldName` (string, required)
- `humanReadableMessage` (string, optional)

### UnauthorizedErrorMessage

- `message` (string, optional)

## Examples

**Request**

```json
{
  "text": "text"
}
```

**Response**

```json
{
  "billing_note_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
  "created_at": "2024-01-15T09:30:00Z",
  "encounter_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
  "text": "text",
  "author_auth0_id": "author_auth0_id",
  "author_name": "author_name",
  "billing_note_metadata": {
    "type": "queue_added",
    "queue_id": "queue_id",
    "queue_name": "queue_name"
  },
  "billing_note_type": "manual"
}
```

**SDK Code**

```python
import requests

url = "https://api.joincandidhealth.com/api/billing_notes/v2/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"

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

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

print(response.json())
```

```javascript
const url = 'https://api.joincandidhealth.com/api/billing_notes/v2/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32';
const options = {
  method: 'PATCH',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"text":"text"}'
};

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.joincandidhealth.com/api/billing_notes/v2/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"

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

	req, _ := http.NewRequest("PATCH", 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://api.joincandidhealth.com/api/billing_notes/v2/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"text\": \"text\"\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.joincandidhealth.com/api/billing_notes/v2/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"text\": \"text\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.joincandidhealth.com/api/billing_notes/v2/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', [
  'body' => '{
  "text": "text"
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.joincandidhealth.com/api/billing_notes/v2/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"text\": \"text\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.joincandidhealth.com/api/billing_notes/v2/d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")! 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()
```