> For a complete page index, fetch https://docs.synthflow.ai/llms.txt. For full documentation content, fetch https://docs.synthflow.ai/llms-full.txt.

## Custom end-call reasons

You can now define custom conditions that trigger automatic call termination using the new `end_call_reasons` field on the Agent schema. When the AI agent detects one of these conditions during a conversation, it says a brief farewell and ends the call. This works with both simple prompt and Flow Designer agents.

**Updated endpoints:**

| Endpoint                                                                                | Title           |
| --------------------------------------------------------------------------------------- | --------------- |
| [**POST /assistants**](/api-reference/platform-api/agents/create-assistant)             | Create an agent |
| [**PUT /assistants/\{model\_id}**](/api-reference/platform-api/agents/update-assistant) | Update an agent |

**New response fields:**

When a call ends due to a custom end-call reason, the post-call webhook response includes:

| Field                    | Description                                                      |
| ------------------------ | ---------------------------------------------------------------- |
| `end_call_reason`        | Set to `custom_end_call`                                         |
| `custom_end_call_reason` | The specific user-defined reason that triggered call termination |

For more details, see the [End-Call Reasons](/end-call-reasons) documentation.