---
title: "API breaking changes"
description: "Guide for migrating from Router V1 to V2, detailing endpoint changes, removed functionality, and the new state-based routing model."
canonical: "https://docs.cm.com/conversational-router/guides/api-breaking-changes"
---

# API breaking changes

> Guide for migrating from Router V1 to V2, detailing endpoint changes, removed functionality, and the new state-based routing model.

Source: https://docs.cm.com/conversational-router/guides/api-breaking-changes

## Overview

The new model centers on state-based routing: instead of issuing “routing mutations,” you design routing in your flow’s states and switch the active state at runtime. As part of this update, some endpoints were deprecated or revised, paths were adjusted, and new controls were introduced for managing session state.

## General

### Base URL change

The full base URL follows the pattern `https://api.cm.com/{base-path}/accounts`.

| API | V1 Base Path | V2 Base Path |
| - | - | - |
| Control API | conversational/control | router/control |
| Configuration API | conversational/configuration | router/configuration |

## Business Messaging ingress API

### URL change

**V1**: `conversational/router/v1/message-receivers/business-messaging/accounts/{accountId}/{messages|events}`

**V2**: `router/businessmessaging/v1/accounts/{accountId}/{messages|events}`

## Configuration API

### Removed endpoint

#### Retrieve BM webhook URL

`GET v1/logical-accounts/{LogicalAccountId}/webhook-url`

#### Get message recall identifiers

`GET v1/accounts/{LogicalAccountId}/message-recall-identifiers`

## Control API

### Removed Endpoints

#### Routing Mutation Requests

`POST v1/accounts/{accountId}/chats/{chatId}/routing/mutationrequests`

This functionality has been removed. Model routing in flow states and switch the active state instead of issuing mutation requests.

#### Get Router Chat Target Adapter

`GET v1/accounts/{accountId}/chats/{chatId}/rules/{ruleId}/targets`

This functionality has been removed. Target selection now is determined by your configured state links.

#### Invoke Command

`POST v1/accounts/{logicalAccountId}/chats/{chatId}/commands`

Use state changes to alter routing; command-based mutations are no longer supported.

#### Add position request

`POST v1/accounts/{logicalAccountId}/sessions/positionrequests`

This functionality has been removed since Router V2 will not support Scripted Chatbot.

### Modified Endpoints

#### Reset Router

**V1**: `POST v1/accounts/{accountId}/chats/{chatId}/routing/reset`

**V2**: `PUT v1/accounts/{accountId}/chats/{chatId}/session/end`

**Changes**: HTTP method (POST → PUT), path change.

#### Get Router State

**V1**: `GET v1/accounts/{accountId}/chats/{chatId}/routing`

**V2**: `GET v1/accounts/{accountId}/chats/{chatId}/session`

**Changes**: path change.

#### Ensure New Session

**V1**: `POST v1/accounts/{accountId}/routing/ensure-new-session`

```json
{
    "clientId": "string",
    "hostId": "string",
    "channel": "string"
  }
```

**V2**: `POST v1/accounts/{accountId}/chats/{chatId}/session/new`

```json
{
    "clientId": "string",
    "hostId": "string",
    "channel": "string",
    "reason": "string",
  	"context": [
      { 
        "key": "value"
      }
		],
    "sourceApplicationId": "guid"
  }
```

**Changes**: path change, request body.

### New Endpoints

#### Set Active State Name

`PUT v1/accounts/{accountId}/chats/{chatId}/session/state`

```json
 {
    "NewStateNameId": "string",
    "context": { "key": "value" }
  }
```

Sets the active state for a chat session at runtime, immediately updating how messages are routed. Use this in place of V1 routing mutations/commands.

You can receive the configured states for an account using the following API call:

`GET /api/configuration/v1/accounts/{accountId}/state-names`
