# Update client settings

https://radiologydictation.com/docs/patch-v1-client-settings

```http
PATCH /v1/client/settings
```

Update the saved preferences that your workspace uses for future reports. Send only the fields you intend to change, together with expected_revision from a recent settings read. Any active workspace API key can perform this update, so keep integration keys private.

Omitted fields stay unchanged. Empty strings clear instruction fields, while null values and empty updates are rejected. A supplied standards_text must be a valid, nonempty standards library. Changes apply to subsequent reports; reports already running keep their settings snapshot.

## Make a small, deliberate change

First call GET /v1/client/settings. For example, if its revision is 3, send expected_revision: 3 together with the new style_instructions. Use the revision returned by the API rather than copying a revision number from an example. The successful response contains the saved settings and the new revision.

| Setting | What belongs here | Example instruction |
| --- | --- | --- |
| standards_text | Your study-specific report standards, each identified by its own label. | MRI-LSP followed by your approved lumbar spine report wording. |
| transcription_instructions | Terminology guidance for recognizing the spoken words. | Preserve laterality, measurements, and negation exactly as dictated. |
| dictation_conventions | How to interpret spoken commands and corrections when building the report. | Treat “new paragraph” as a paragraph break and apply explicit spoken corrections. |
| style_instructions | Preferences for wording, organization, and the level of certainty in the report. | Use concise sentences and keep the impression focused on the key conclusions. |

## Handle a revision conflict

A 409 means someone else saved changes after your read. Read the current settings again, preserve unrelated changes, and decide how to combine the edits before retrying with the new expected_revision. Do not automatically replace all fields with your older copy.

If an agent manages settings, require a deliberate preference-saving action. It should never turn ordinary report dictation into a settings update. Put study templates in standards_text and use the three instruction fields for their distinct purposes.

[Standards and instructions](https://radiologydictation.com/docs/standards.md)

## Authentication

Create a named API key in your workspace’s API keys tab, then send it in the Authorization header on each API request. Your key connects the integration to that workspace’s saved settings and Word templates. Signing into the website does not replace this header in an API integration.

```http
Authorization: Bearer <API_KEY>
```

Keep the key in your application’s server-side secret configuration. It is shown only once when created, so save it securely then. Do not place it in browser code, logs, version control, or a prompt sent to your coding agent. You can revoke an integration’s key from the workspace without changing the other keys.

## Request

```http
application/json
```

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| expected_revision | integer | Yes | minimum=0.0 | revision from your most recent settings read. A stale value returns 409 instead of overwriting newer settings. |
| standards_text | string | No | maxLength=200000 | Replace the saved standards library. Must contain at least one recognized unique label; cannot be empty. Omit to preserve it. |
| transcription_instructions | string | No | maxLength=20000 | Replace terminology guidance. Omit to preserve it; an empty string clears it. Null is rejected. |
| dictation_conventions | string | No | maxLength=20000 | Replace spoken-command and correction rules. Omit to preserve them; an empty string clears them. Null is rejected. |
| style_instructions | string | No | maxLength=20000 | Replace report-writing preferences. Omit to preserve them; an empty string clears them. Null is rejected. |
| technique_instructions | TechniqueInstructions | No |  |  |
| groups | array<SettingsGroup> | No | minItems=1; maxItems=100 |  |

### Request examples

```json
{
  "expected_revision": 0,
  "style_instructions": ""
}
```

## Example

```bash
BASE_URL=https://radiologydictation.com

curl --request PATCH "$BASE_URL/v1/client/settings" \
  --header "Authorization: Bearer $API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"expected_revision": 0, "style_instructions": ""}'
```

## Responses

| Status | Description | Type |
| --- | --- | --- |
| 200 | Successful Response | ClientSettings · application/json |
| 401 | Invalid or missing API key |  |
| 429 | Too many attempts. Please try again later. |  |
| 503 | Service is unavailable. Please try again. |  |
| 400 | Standards must have unique study IDs, such as MRI-LSP. |  |
| 413 | Request is too large. | object · application/json |
| 415 | JSON request required. | object · application/json |
| 409 | Your changes were not saved. Reload settings before trying again. |  |
| 422 | Validation Error | HTTPValidationError · application/json |

### Response headers · 429

| Header | Type | Description |
| --- | --- | --- |
| Retry-After | integer |  |

## Schemas

### ClientSettings

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| standards_text | string | No | maxLength=200000; default="" | Your saved study-specific report wording. Begin each standard with a unique uppercase, hyphen-separated label on its own line, such as MRI-LSP. |
| transcription_instructions | string | No | maxLength=20000; default="" | Terminology guidance used when recognizing spoken words, such as medical names, laterality, and measurements. |
| dictation_conventions | string | No | maxLength=20000; default="" | Rules for interpreting spoken commands and corrections when constructing the report. |
| style_instructions | string | No | maxLength=20000; default="" | Preferences for report wording, organization, and expression of certainty. |
| technique_instructions | TechniqueInstructions | No |  |  |
| pathology_text | string | No | maxLength=200000; default="" |  |
| revision | integer | No | minimum=0.0; default=0 | The saved settings version. Send this value as expected_revision when preparing an update. |
| groups | array<SettingsGroup> | No | minItems=1; maxItems=100 |  |

### ClientSettingsUpdate

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| expected_revision | integer | Yes | minimum=0.0 | revision from your most recent settings read. A stale value returns 409 instead of overwriting newer settings. |
| standards_text | string | No | maxLength=200000 | Replace the saved standards library. Must contain at least one recognized unique label; cannot be empty. Omit to preserve it. |
| transcription_instructions | string | No | maxLength=20000 | Replace terminology guidance. Omit to preserve it; an empty string clears it. Null is rejected. |
| dictation_conventions | string | No | maxLength=20000 | Replace spoken-command and correction rules. Omit to preserve them; an empty string clears them. Null is rejected. |
| style_instructions | string | No | maxLength=20000 | Replace report-writing preferences. Omit to preserve them; an empty string clears them. Null is rejected. |
| technique_instructions | TechniqueInstructions | No |  |  |
| groups | array<SettingsGroup> | No | minItems=1; maxItems=100 |  |

### HTTPValidationError

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| detail | array<ValidationError> | No |  |  |

### Pathology

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| id | string | Yes | pattern="^[a-zA-Z0-9_-]+$"; minLength=1; maxLength=64 |  |
| when_dictated | string | Yes | minLength=1; maxLength=20000 |  |
| findings | string | Yes | minLength=1; maxLength=20000 |  |
| impression | string | No | maxLength=20000; default="" |  |

### SettingsEntry

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| id | string | Yes | pattern="^[a-zA-Z0-9_-]+$"; minLength=1; maxLength=64 |  |
| name | string | No | maxLength=80; default="" |  |
| text | string | No | maxLength=200000; default="" |  |
| pathologies | array<Pathology> | No | maxItems=100 |  |

### SettingsGroup

One organization-only section; every section participates in requests.

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| id | string | Yes | pattern="^[a-zA-Z0-9_-]+$"; minLength=1; maxLength=64 |  |
| name | string | Yes | minLength=1; maxLength=80 |  |
| standards_text | string | No | maxLength=200000; default="" |  |
| transcription_instructions | string | No | maxLength=20000; default="" |  |
| dictation_conventions | string | No | maxLength=20000; default="" |  |
| style_instructions | string | No | maxLength=20000; default="" |  |
| entries | object | No |  |  |

### TechniqueInstructions

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| mri | string | No | pattern="^[^\\\\x00]*$"; default="" |  |
| ct | string | No | pattern="^[^\\\\x00]*$"; default="" |  |
| xray | string | No | pattern="^[^\\\\x00]*$"; default="" |  |

### ValidationError

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| loc | array<string \| integer> | Yes |  |  |
| msg | string | Yes |  |  |
| type | string | Yes |  |  |
| input | object | No |  |  |
| ctx | object | No |  |  |
