---
title: "CreateVirtualHostMapping"
method: POST
path: "/v1/vhost/mapping/"
tags: ["vhosts"]
---

# CreateVirtualHostMapping

`POST /v1/vhost/mapping/`

Create a new vhost mapping.

## Request body

- DtoCreateMapping
  - `hostname` string
  - `mappingSecurityRuleId` integer
  - `matchPattern` 'begins-with' | 'contains' | 'equals' | 'ends-with'
  - `path` string
  - `shouldUpgradeInsecureRequests` boolean
  - `targetHttpResponseCode` integer
  - `targetType` 'url' | 'service' | 'response-code' | 'inline-html' | 'static-files'
  - `targetValue` string

## Response `201`

MappingCreated

- object

---

[API](https://skmtc.net/goinfinite/apis/osapi.md) · [All operations](https://skmtc.net/goinfinite/apis/osapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/goinfinite/osapi/versions/7320a5d8ef9e/schema)
