---
schema_version: "1"
id: 13d877c9c139dd19d588a4657fe4a5553c0eba3a5696890e91c06ee70dd3596b
title: Clear Routing
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/interaction-service-api/references/api-route-delete.md
canonical_url: https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-route-delete.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5713f01a7a36530551f37dae29aefeb09ce31e24e9245180cf1af0ce9a54e5d1
products:
  - Interaction Service API
  - Service Cloud Developer Content
---
# Clear Routing

Deletes the Pending Service Routing (PSR) record for the specified conversation.

This API doesn’t need to be called for most scenarios; the PSR record is automatically deleted when the call is no longer being routed. However, there are some scenarios, like for missed or abandoned messages when using partner telephony systems (excluding Amazon Connect), where you must explicitly call this API to clear the PSR record.

This API applies to the following product:

- Bring Your Own Channel for Contact Center as a Service

This API is available in version 62.0 and later.

## URI

`v1/route`

## HTTP Method

DELETE

## Headers

### Authorization (User-Level Authentication)

**Format:** `Bearer <Salesforce Access Token>`  
String. Standard header. Used to authenticate the user, where `<Salesforce Access Token>` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required.

### Content-Type

**Format:** `application/json`  
String. Standard header. Format of the request payload. Required for any request that includes a body.

### OrgId

**Format:** `<Salesforce Org ID>`  
String. Custom header. The Salesforce org. `<Salesforce Org ID>` is the 15-character Org ID of the Salesforce org. Required.

### RequestId

**Format:** `<UUID>`  
String. Custom header. Universally Unique Identifier (`<UUID>`) that references and tracks this request. Required.

### AuthorizationContext

**Format:** `<AuthorizationContext>`  
String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes.

- For Bring Your Own Channel for CCaaS, set `<AuthorizationContext>` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required.

### Sample Header

```
-H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \
-H "content-type: application/json" \
-H "OrgId: 00DSG000009SWby" \
-H "AuthorizationContext: Partner1_ChannelDefinition1" \
-H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \
```

## Parameters

| Property Name          | Type   | Description                                                                                                                                                                                                                                                                                              | Required |
| :--------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| cancelReason           | enum   | The reason why conversation routing was cancelled. Valid values include:<br>\- **UNKNOWN (0)** \- An unknown cancellation reason such as an error.<br>\- **UNAVAILABLE (1)** \- The rep was unavailable.<br>\- **DECLINE (2)** \- The rep declined.<br>\- **CANCEL (3)** \- Generic cancellation reason. | No       |
| conversationIdentifier | string | The unique ID for the conversation channel.                                                                                                                                                                                                                                                              | Yes      |

## Example

```json
{
  "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1",
  "cancelReason": "Decline"
}
```

## See Also

- _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis)
