> This page is for Gateway.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# List routing policies

GET https://api-gateway.merge.dev/v1/routing-policies

List the organization's standalone routing policies. Customer-, project-scoped, and derived policies are excluded. Requires the manage_routing scope.

Authenticates with a management key (manage_routing scope) or any active gateway API key of the organization.

Reference: https://docs.merge.dev/merge-gateway/management-api/routing-policies/list-routing-policies

## Authentication

- `Authorization` header (bearer token, required) — A management key (prefixed `mgmt_`), created on the dashboard's **API keys** page under **Management keys**. Distinct from a regular gateway API key, and never used to call models.

## Request

### Query parameters

- `include_inline` (boolean, optional, default: false) — Also list policies the gateway materialized from requests' `priority_order` lists. Hidden by default.

## Response

### 200

The org's routing policies.

- `results` (list of RoutingPolicy, optional)
- `next` (string, optional) — Always null; the org's policies are returned in one page.
- `previous` (string, optional)

## Types

### RoutingPolicy

The project's scoped routing policy. The id is stable across updates (updates apply in place).

- `id` (string, optional)
- `name` (string, optional)
- `description` (string, optional)
- `slug` (string, optional, nullable) — The policy's model alias (bare name), e.g. "fast-experiment". Null only when no alias could be minted, such as an organization at its alias cap.
- `model` (string, optional, nullable) — The ready-to-send model string for this policy, e.g. "@alias/fast-experiment". Send it as the model in any Gateway request to route with this policy.
- `strategy` (enum, optional)
  - Allowed values: `PRIORITY`, `INTELLIGENT`
- `allowed_providers` (list of string, optional)
- `allowed_models` (list of string, optional)
- `priority_order` (list of PriorityEntry, optional)
- `axis` (enum, optional) — Optimization axis the router optimizes for (INTELLIGENT only, else null); one of COST, PERFORMANCE, CAPABILITY.
  - Allowed values: `COST`, `PERFORMANCE`, `CAPABILITY`
- `created_at` (datetime, optional)
- `modified_at` (datetime, optional)

### PriorityEntry

- `model` (string, required) — Canonical model slug (provider/model).
- `priority` (integer, required) — Lower tries first.

## Examples

**Response**

```json
{
  "results": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "slug": "string",
      "model": "string",
      "strategy": "PRIORITY",
      "allowed_providers": [
        "string"
      ],
      "allowed_models": [
        "string"
      ],
      "priority_order": [
        {
          "model": "openai/gpt-5.5",
          "priority": 1
        }
      ],
      "axis": "COST",
      "created_at": "2024-01-15T09:30:00Z",
      "modified_at": "2024-01-15T09:30:00Z"
    }
  ],
  "next": "string",
  "previous": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api-gateway.merge.dev/v1/routing-policies"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api-gateway.merge.dev/v1/routing-policies';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-gateway.merge.dev/v1/routing-policies"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-gateway.merge.dev/v1/routing-policies")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gateway.merge.dev/v1/routing-policies")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway.merge.dev/v1/routing-policies', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api-gateway.merge.dev/v1/routing-policies");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway.merge.dev/v1/routing-policies")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```