# Correct an answer

`PATCH https://app.whatsetter.com/api/v1/knowledge-bases/{id}/answers/{answerId}`

Changes the `question`, the `answer`, or both. The agents use the new
text on their next reply. Correcting an existing answer works on every
plan. Requires scope `knowledge:write`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes |  |
| `answerId` | path | string | yes |  |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `question` | string | no |  |
| `answer` | string | no |  |

```json
{
  "answer": "The trial session is free. Bring sports shoes and a towel."
}
```

## Example request

```bash
curl --request PATCH \
  --url 'https://app.whatsetter.com/api/v1/knowledge-bases/{id}/answers/{answerId}' \
  --header 'Authorization: Bearer ws_live_…'
  --header 'Content-Type: application/json' \
  --data '{"answer":"The trial session is free. Bring sports shoes and a towel."}'
```

## Responses

### 200: The corrected answer

```json
{
  "data": {
    "id": "68e3a90f0026d1e4b7a2",
    "question": "How much is the trial session?",
    "answer": "The trial session is free. Bring sports shoes and a towel.",
    "created_at": "2026-10-08T14:20:05.000+00:00",
    "updated_at": "2026-10-08T14:31:47.000+00:00"
  }
}
```

### 401: Missing, unknown or revoked API key

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 403: The key lacks the required scope (`insufficient_scope`), the plan does not have this part of the API (`not_in_plan`), or Instagram is not enabled on the workspace (`instagram_not_enabled`, Instagram routes)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 404: Resource not found in this workspace

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 422: Nothing to change, or an empty or too long field

```json
{
  "error": {
    "code": "validation_error",
    "message": "Send \"question\", \"answer\", or both."
  }
}
```

### 502: The knowledge store did not accept the answer (nothing was saved)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```


Source: https://docs.whatsetter.com/api-reference/operations/updateknowledgeanswer/
