---
title: "[BETA] Create a route"
method: POST
path: "/vpc/{vpc-id}/subnet/{subnet-id}/route"
tags: ["vpc-route"]
---

# \[BETA\] Create a route

`POST /vpc/{vpc-id}/subnet/{subnet-id}/route`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/vpc/{vpc-id}/subnet/{subnet-id}/route`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/vpc/:vpc-id/subnet/:subnet-id/route/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `vpc-id` string, uuid, required
- `subnet-id` string, uuid, required

## Request body

- object
  - `description` string: Route description
  - `destination` string, required: Route destination CIDR
  - `target` string, required: Route target

## Response `200`

200

- Route: Route
  - `id` string, uuid: Route ID
  - `kind` 'Subnet' | 'Vpc': Route kind
  - `description` string: Route description
  - `destination` string: Route destination CIDR
  - `target` string: Route target

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
