---
title: "Create Network Mapping"
method: POST
path: "/dns/v2/network-mappings"
tags: ["NetworkMappings"]
---

# Create Network Mapping

`POST /dns/v2/network-mappings`

Create new network mapping.

Example of request:

```
curl --location --request POST 'https://api.gcore.com/dns/v2/network-mappings' \
--header 'Authorization: Bearer ...' \
--header 'Content-Type: application/json' \
--data-raw '{
	"name": "test",
	"mapping": [
		{
			"tags": [
				"tag1"
			],
			"cidr4": [
				"192.0.2.0/24",
				"198.0.100.0/24"
			]
		},
		{
			"tags": [
				"tag2",
				"tag3"
			],
			"cidr4": [
				"192.1.2.0/24",
				"198.1.100.0/24"
			],
			"cidr6": [
				"aa:10::/64"
			]
		}
	]
}'
```

## Request body

- NetworkMapping
  - `id` integer
  - `mapping` MappingEntry[]
    - `cidr4` string[]
    - `cidr6` string[]
    - `tags` string[]
  - `name` string

## Response `200`

CreateNetworkMappingResponse

- CreateNetworkMappingResponse
  - `id` integer

## Other responses

- `400` — Error message response

---

[API](https://skmtc.dev/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.dev/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
