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

# Update a glossary term

PATCH https://example.ada.support/api/v2/glossary/{glossary_term_id}
Content-Type: application/json

Update a glossary term. Only the fields provided in the request body are changed; omitted fields are left as they are.

Reference: https://docs.ada.cx/reference/glossary/update

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `glossary_term_id` (string, required) — The id of the glossary term

### Body (application/json)

This endpoint expects a GlossaryTermUpdate.

- `external_id` (string, optional) — Rename the term's identifier. Rejected with 409 if another term in the AI Agent already uses it.
- `translation_mode` (enum, optional) — `custom` restates detected `user_terms` using `ai_agent_terms`; `default` only surfaces the definition.
  - Allowed values: `default`, `custom`
- `user_terms` (list of GlossaryTermConfig, optional, nullable) — Replaces the existing list. Send `null` to clear it; omit to leave it unchanged.
- `ai_agent_terms` (list of GlossaryTermConfig, optional, nullable) — Replaces the existing list. Send `null` to clear it; omit to leave it unchanged.
- `voice_detection_enabled` (boolean, optional) — Whether the term is passed to the voice agent to improve how reliably it is recognized in speech.
- `definition` (string, optional, nullable) — Send `null` to clear it; omit to leave it unchanged
- `voice_pronunciations` (list of GlossaryPronunciationInput, optional, nullable) — Replaces the existing list, send null to clear it, or omit to leave it unchanged
- `availability_rules` (AvailabilityRule, optional, nullable) — Omit to leave the current rule unchanged, send null to clear it, or send a rule to replace it; an unknown variable id or a malformed rule is rejected with a 400

## Response

### 200

OK

- `id` (string, required) — The unique identifier for the glossary term
- `external_id` (string, required) — Your own identifier for the term, unique within the AI Agent
- `translation_mode` (enum, required) — `custom` tells the AI Agent to answer using the matching `ai_agent_terms` wording whenever it detects one of the `user_terms`. `default` only surfaces the term's `definition` to the agent (and, with `voice_detection_enabled`, biases speech recognition) without changing its wording.
  - Allowed values: `default`, `custom`
- `user_terms` (list of GlossaryTermConfig, required, nullable) — The wordings a customer might use, per language. `null` when none are configured.
- `ai_agent_terms` (list of GlossaryTermConfig, required, nullable) — The wordings the AI Agent should use, per language. Only meaningful in `custom` mode; `null` when none are configured.
- `voice_detection_enabled` (boolean, required) — Whether the term is passed to the voice agent to improve how reliably it is recognized in speech. Requires a voice platform on the AI Agent.
- `definition` (string, required, nullable) — A business definition of the term, shown to the AI Agent when the term is detected. `null` when unset.
- `voice_pronunciations` (list of GlossaryPronunciationConfig, required, nullable) — Phonetic respellings applied to the AI Agent's outgoing speech on voice calls, or `null` when none are configured
- `availability_rules` (AvailabilityRule, required, nullable) — The structured rule that gates when this term applies, with variables referenced by id, or null when no rule is attached

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 401 Unauthorized Error

Unauthorized

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 404 Not Found Error

Not Found

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 409 Conflict Error

Conflict — the new external_id is already used by another term, or enabling voice detection would exceed the AI Agent's voice-term limit

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 429 Too Many Requests Error

Too Many Requests

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 500 Internal Server Error

Internal Server Error

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

## Types

### GlossaryTermConfig

A single language-specific term surface within a glossary entry

- `term` (string, required) — The term as written in the given language
- `language` (string, required) — ISO 639-1 language code for the term

### GlossaryPronunciationInput

A voice pronunciation supplied on a create or update, carrying the length limits the write path enforces

- `language` (string, required) — The language this spelling applies to
- `term` (string, required) — The written form to respell, matched whole-word and case-insensitively
- `pronunciation` (string, required) — The spelling sent to text-to-speech in place of `term`

### AvailabilityRule

A two-level tree of conditions that determines availability based on variable values during a conversation. The root group has a `match` combinator and a list of conditions or condition groups. A rule may contain at most 1000 conditions in total, counting every condition across the root and all nested condition groups.

- `match` (enum, required) — Whether all conditions must pass (`all`) or any one condition must pass (`any`).
  - Allowed values: `all`, `any`
- `conditions` (list of AvailabilityRuleConditionsItems, required) — List of conditions or condition groups. Must contain at least one entry. Each entry is either a `Condition` object (with `variable`, `operator`, and optional `value`) or a `ConditionGroup` object (with its own `match` and nested `conditions` list).

### GlossaryPronunciationConfig

One written form and the spelling the AI Agent speaks in its place, for one language

- `language` (string, required) — The language this spelling applies to
- `term` (string, required) — The written form to respell, matched whole-word and case-insensitively
- `pronunciation` (string, required) — The spelling sent to text-to-speech in place of `term`

### ErrorsErrorsItems

- `type` (string, required) — The error type
- `message` (string, required) — The error message
- `details` (string, optional, nullable) — Extra information about the error

### AvailabilityRuleConditionsItems

### AvailabilityRuleCondition

A single condition comparing a variable to a value.

- `variable` (AvailabilityRuleConditionVariable, required) — The variable to test, referenced by `id`. Look up the ids for your Agent through the variables endpoint. Not every variable can be used in a rule; referencing one that can't returns a `400`.
- `operator` (enum, required) — The comparison operator. Unary operators (`is_set`, `is_not_set`) must not include a `value` field.
  - Allowed values: `equals`, `does_not_equal`, `greater_than`, `less_than`, `starts_with`, `ends_with`, `contains`, `does_not_contain`, `is_set`, `is_not_set`
- `value` (AvailabilityRuleConditionValue, optional) — The value to compare against. Omit for unary operators (`is_set`, `is_not_set`).
- `case_sensitive` (boolean, optional) — Whether the comparison is case-sensitive. Defaults to `false`. Only meaningful for the equality (`equals`, `does_not_equal`) and string (`starts_with`, `ends_with`, `contains`, `does_not_contain`) operators. Omitted from responses when `false`.

### AvailabilityRuleConditionGroup

A nested group of conditions inside a rule's top-level `conditions` list. Condition groups may contain only `Condition` objects — further nesting is not supported.

- `match` (enum, required) — Whether all conditions must pass (`all`) or any one condition must pass (`any`).
  - Allowed values: `all`, `any`
- `conditions` (list of AvailabilityRuleCondition, required) — List of conditions inside this condition group. Must contain at least one entry.

### AvailabilityRuleConditionVariable

The variable to test, referenced by `id`. Look up the ids for your Agent through the variables endpoint. Not every variable can be used in a rule; referencing one that can't returns a `400`.

- `id` (string, required) — The id of the variable.

### AvailabilityRuleConditionValue

The value to compare against. Omit for unary operators (`is_set`, `is_not_set`).

## Examples

**Request**

```json
{
  "definition": "Money returned to a customer after a completed purchase."
}
```

**Response**

```json
{
  "id": "65a17e3f43bec88e2792d0eb",
  "external_id": "refund-policy",
  "translation_mode": "custom",
  "user_terms": [
    {
      "term": "money back",
      "language": "en"
    }
  ],
  "ai_agent_terms": [
    {
      "term": "refund",
      "language": "en"
    }
  ],
  "voice_detection_enabled": false,
  "definition": "Money returned to a customer after a completed purchase.",
  "voice_pronunciations": null,
  "availability_rules": null
}
```

**SDK Code**

```python
import requests

url = "https://example.ada.support/api/v2/glossary/65a17e3f43bec88e2792d0eb"

payload = { "definition": "Money returned to a customer after a completed purchase." }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://example.ada.support/api/v2/glossary/65a17e3f43bec88e2792d0eb';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"definition":"Money returned to a customer after a completed purchase."}'
};

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://example.ada.support/api/v2/glossary/65a17e3f43bec88e2792d0eb"

	payload := strings.NewReader("{\n  \"definition\": \"Money returned to a customer after a completed purchase.\"\n}")

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

	req.Header.Add("Authorization", "Bearer <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://example.ada.support/api/v2/glossary/65a17e3f43bec88e2792d0eb")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"definition\": \"Money returned to a customer after a completed purchase.\"\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://example.ada.support/api/v2/glossary/65a17e3f43bec88e2792d0eb")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"definition\": \"Money returned to a customer after a completed purchase.\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://example.ada.support/api/v2/glossary/65a17e3f43bec88e2792d0eb', [
  'body' => '{
  "definition": "Money returned to a customer after a completed purchase."
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://example.ada.support/api/v2/glossary/65a17e3f43bec88e2792d0eb");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"definition\": \"Money returned to a customer after a completed purchase.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["definition": "Money returned to a customer after a completed purchase."] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://example.ada.support/api/v2/glossary/65a17e3f43bec88e2792d0eb")! 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()
```