---
title: "Create Route"
method: POST
path: "/resources/routes/v1"
tags: ["API Access Control"]
---

# Create Route

`POST /resources/routes/v1`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/routes/v1`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/routes/v1/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new route

## Request body

- CreateRouteDto
  - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | '*', required: Http Method
  - `path` string, required: Route path
  - `policyType` 'allow' | 'deny' | 'ruleBased', required: Route policy type
  - `description` string, required: Route description

## Response `200`

- RouteDto
  - `id` string, required
  - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | '*', required
  - `path` string, required
  - `priority` number, required
  - `description` string, required
  - `policyType` 'allow' | 'deny' | 'ruleBased', required
  - `rules` RouteRuleDto[], required
    - `id` string, required
    - `routeId` string, required
    - `type` 'feature' | 'permission', required
    - `value` string, required

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
