> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Coaching Rule API

[Back to API List](https://koreai.mintlify.site/ai-for-service/apis/agent-ai/api-list)

Updates an existing coaching rule for a specific bot. Use this API to modify the coaching rule name, description, and trigger conditions used to identify customer interactions that require coaching actions.

| **METHOD** | **PUT** |
| :- | :- |
| Endpoint | `https://{{host}}/agentassist/api/v1/public/{{streamid}}/acrules/{{ruleId}}` |
| Content Type | `application/json` |
| Authorization | `auth: {{JWT}}` — See [How to generate the JWT Token](https://koreai.mintlify.site/ai-for-service/apis/automation/api-introduction.md#generating-the-jwt-token). |

## Header Parameters

| Header | Type | Required | Description |
| - | - | - | - |
| `auth` | String | Yes | JWT token used for authentication. |
| `accountid` | String | Yes | Unique account identifier. |

## Path Parameters

| Parameter | Description | Type |
| :- | :- | :- |
| `host` | Environment URL. For example, `https://platform.kore.ai/` | String, required |
| `streamId` | `botId` or `streamId`. Retrieve this from the [App Settings](https://koreai.mintlify.site/ai-for-service/app-settings.md) page. | string, required |
| `ruleId` | Unique identifier of the coaching rule to retrieve. | String, required |

## Request Body

| Parameter | Type | Required | Description |
| - | - | - | - |
| `name` | String | Yes | Name of the coaching rule. |
| `description` | String | No | Description of the coaching rule. |
| `triggers` | Array | Yes | List of trigger conditions that activate the coaching rule. |
| `_id` | String | No | Unique identifier of the trigger. |
| `type` | String | Yes | Trigger type. Supported values: `utterance`, `genai`. |
| `by` | String | Yes | Participant whose utterances are evaluated. For example, `customer` or `agent`. |
| `operator` | String | No | Logical operator used to combine trigger conditions. Supported values: `and`, `or`. |
| `triggerDesc` | String | Conditional | Natural language description used by GenAI triggers. Required when `type` is `genai`. |
| `when` | Object | Conditional | Utterance matching configuration. Required when `type` is `utterance`. |
| `frequency` | Object | No | Defines how often the trigger must occur before activation. |
| `addUtterances` | Array | Yes | List of utterances to match. |
| `utteranceCount` | Integer | No | Minimum number of utterances that must match. |
| `nOccurrences` | Integer | No | Number of times the condition must occur. |
| `duration` | String | No | Time window in which occurrences are evaluated. |

## Sample Request

```bash expandable=true theme={null}
curl --location --max-time 15 --request PUT 'https://{{host}}/agentassist/api/v1/public/{{streamid}}/acrules/{{ruleId}}' \
--header 'auth: {{JWT_TOKEN}}' \
--header 'accountid: {{accountid}}' \
--header 'Content-Type: application/json' \
--data '{
    "name": "",
    "description": "",
    "triggers": [
      {
         "_id": "aat-c6ce49c2-536************9-51b6-9134ed683cc7fd0f",
        "type": "utterance",
        "by": "customer",
        "operator": "or",
        "when": {
          "addUtterances": [
            { "utterance": "" },
            { "utterance": "" }
          ],
          "utteranceCount": 1
        },
        "frequency": {
          "nOccurrences": 1,
          "duration": "anyTime"
        }
      },
      {
          "_id": "aat-1fc7977f--************-ffe4eabe8bad",
        "type": "genai",
        "by": "customer",
        "operator": "or",
        "triggerDesc": "",
        "frequency": {
          "nOccurrences": 1,
          "duration": "anyTime"
        }
      }
    ]
}
```

## Sample Response

```json expandable=true theme={null}
{
  "name": "",
  "description": "",
  "tags": [
    "genai"
  ],
  "channels": [
    "voice",
    "chat"
  ],
  "isActive": false,
  "botId": "st-6165d5c2-171a-54cc************d318de",
  "accountId": "6a5a0e19*********d634415e",
  "createdOn": "2026-07-16T13:13:06.088Z",
  "triggers": [
    {
      "_id": "aat-36c06a88-a446*********dbd58c135",
      "type": "genai",
      "by": "customer",
      "operator": "and",
      "triggerDesc": ""
    }
  ],
  "actions": [
    {
      "_id": "aat-86d1*********deefb00b7f850",
      "type": "hint",
      "expression": "critical"
    }
  ],
  "status": "ACTIVE",
  "state": "configured",
  "id": "acr-a0c594ec-*********d6ee7e74d0bc8"
}
```

## Response Body Parameters

| Field | Type | Description |
| - | - | - |
| name | String | Name of the action rule. |
| description | String | Description of the action rule. |
| tags | Array | Tags associated with the action rule. |
| channels | Array | Channels on which the action rule is applicable, such as `voice` and `chat`. |
| isActive | Boolean | Indicates whether the action rule is currently active. |
| botId | String | Unique identifier of the bot associated with the action rule. |
| accountId | String | Unique identifier of the account that owns the action rule. |
| createdOn | String (ISO 8601 Date-Time) | Date and time when the action rule was created. |
| triggers | Array | List of trigger conditions configured for the action rule. |
| triggers.\_id | String | Unique identifier of the trigger. |
| triggers.type | String | Type of trigger, such as `genai`. |
| triggers.by | String | Entity that initiates the trigger, such as `customer`. |
| triggers.operator | String | Logical operator used to evaluate multiple trigger conditions, such as `and`. |
| triggers.triggerDesc | String | Description of the trigger condition. |
| actions | Array | List of actions executed when the trigger conditions are met. |
| actions.\_id | String | Unique identifier of the action. |
| actions.type | String | Type of action to perform, such as `hint`. |
| actions.expression | String | Expression or value associated with the action. |
| status | String | Current status of the action rule, such as `ACTIVE`. |
| state | String | Configuration state of the action rule, such as `configured`. |
| id | String | Unique identifier of the action rule. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.