---
title: "Simulate route selection"
method: POST
path: "/callrouting/1/routes/simulate"
tags: ["channels", "voice", "routing", "call-routing-simulator"]
---

# Simulate route selection

`POST /callrouting/1/routes/simulate`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/callrouting/1/routes/simulate`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

Simulates which route will be selected upon predefined request.

## Request body

- C5d63eb36983d8ea1e54e74166c0e08ea636cff38a55aa9570bd7ba615a520a0RouteSimulatorRequest: Route simulator request object.
  - `to` string, required: Phone number or regular expression pattern representing the phone number. Applies to all simulator endpoint types except `WEBRTC`. Examples: `41793026727`, `41793(.+)`.
  - `useDisabledRoutes` boolean: If set to `true`, the simulator will use disabled routes for simulation. If set to `false`, only enabled routes will be used.
  - `endpoint` 287f18f04e9f129a7bc94ed3ae48e2480e2673b8fdf041ab5125fde9674634b8SimulatorCallEndpoint, required: Simulator endpoint to be used for the simulation.
    - `type` 'SIP' | 'PHONE' | 'WEBRTC' | 'WHATSAPP'

## Response `200`

Success

- 1e938b22275568ebc747d21724b50c9be18ff5770eb33c37b76fda4633c14bdeRouteResponse: Route response object.
  - `id` string, required: Unique identifier of a route.
  - `name` string, required: Route name.
  - `criteria` 287f18f04e9f129a7bc94ed3ae48e2480e2673b8fdf041ab5125fde9674634b8SearchCriteria[]: List of criteria that should match route. For a route to match, any criterion should be met.
    - `to` string: Phone number or regular expression pattern representing the phone number. Applies to all search criteria types except `WEBRTC`. Examples: `41793026727`, `41793(.+)`.
    - `value` 287f18f04e9f129a7bc94ed3ae48e2480e2673b8fdf041ab5125fde9674634b8Criteria: Criteria type.
      - `type` 'PHONE' | 'SIP' | 'WEBRTC' | 'APPLICATION' | 'WHATSAPP', required
  - `destinations` 287f18f04e9f129a7bc94ed3ae48e2480e2673b8fdf041ab5125fde9674634b8Destination[], required: List of destinations. First destination in the list is the first one to be executed. Subsequent destinations are executed only if the previous one fails.
    - `priority` integer
    - `type` 'APPLICATION' | 'ENDPOINT' | 'URL', required
    - `weight` integer
  - `status` 'ENABLED' | 'DISABLED', required: Indicates whether the route is enabled or not.
  - `order` integer: Indicates priority index of the route. Routes with lower priority index are executed first.
  - `transferOnly` boolean: Indicates whether this route should be used exclusively for call transfers initiated via the REFER SIP message. The `to` number value will be taken from the `Refer-To` header.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
