# Update

Launch stage: Beta

`PATCH /api/2.1/{name=knowledge-assistants/*/examples/*}`

Updates an example in a Knowledge Assistant.

API scopes: knowledge-assistants

## Path parameters

- `name` (string, optional)
  The resource name of the example to update.
   Format: knowledge-assistants/{knowledge_assistant_id}/examples/{example_id}

## Query parameters

- `update_mask` (string, optional)
  Comma-delimited list of fields to update on the example.
   Allowed values: `question`, `guidelines`.
   Examples:
   - `question`
   - `question,guidelines`

## Request body

- `example` (object, optional)
  - `name` (string, optional)
    Full resource name:
     knowledge-assistants/{knowledge_assistant_id}/examples/{example_id}
  - `question` (string, optional)
    The example question.
  - `guidelines` (array of string, optional)
    Guidelines for answering the question. Optional — examples may be created
     with just a question; the front-end form does not require guidelines.
  - `example_id` (string, optional)
    The universally unique identifier (UUID) of the example.
  - `create_time` (string, optional)
    Timestamp when this example was created.
  - `update_time` (string, optional)
    Timestamp when this example was last updated.

## Returns

Returns the Example object.

## Response

```json
{
  "name": "string",
  "question": "string",
  "guidelines": [
    "string"
  ],
  "example_id": "string",
  "create_time": "string",
  "update_time": "string"
}
```

