> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Network Mapping

> 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"
			]
		}
	]
}'
```



## OpenAPI

````yaml /api-reference/services_docs_mintlify/dns_api.yaml post /dns/v2/network-mappings
openapi: 3.1.0
info:
  title: Gcore OpenAPI – DNS API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 1282e760bff2
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Analyze
  - name: Clients
  - name: DNSSEC
  - name: Locations
  - name: Lookup
  - name: Metrics
  - name: NetworkMappings
  - name: Pickers
  - name: RRsets
  - name: Zones
paths:
  /dns/v2/network-mappings:
    post:
      tags:
        - NetworkMappings
      summary: Create Network Mapping
      description: "Create new network mapping.\n\nExample of request:\n\n```\ncurl --location --request POST 'https://api.gcore.com/dns/v2/network-mappings' \\\n--header 'Authorization: Bearer ...' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\t\"name\": \"test\",\n\t\"mapping\": [\n\t\t{\n\t\t\t\"tags\": [\n\t\t\t\t\"tag1\"\n\t\t\t],\n\t\t\t\"cidr4\": [\n\t\t\t\t\"192.0.2.0/24\",\n\t\t\t\t\"198.0.100.0/24\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"tags\": [\n\t\t\t\t\"tag2\",\n\t\t\t\t\"tag3\"\n\t\t\t],\n\t\t\t\"cidr4\": [\n\t\t\t\t\"192.1.2.0/24\",\n\t\t\t\t\"198.1.100.0/24\"\n\t\t\t],\n\t\t\t\"cidr6\": [\n\t\t\t\t\"aa:10::/64\"\n\t\t\t]\n\t\t}\n\t]\n}'\n```"
      operationId: CreateNetworkMapping
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkMapping'
        required: false
      responses:
        '200':
          description: CreateNetworkMappingResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateNetworkMappingResponse'
        '400':
          description: Error message response
          headers:
            error:
              schema:
                type: string
          content: {}
components:
  schemas:
    NetworkMapping:
      type: object
      properties:
        id:
          type: integer
          format: uint64
          readOnly: true
        mapping:
          $ref: '#/components/schemas/Mapping'
        name:
          type: string
    CreateNetworkMappingResponse:
      type: object
      properties:
        id:
          type: integer
          format: uint64
    Mapping:
      type: array
      items:
        $ref: '#/components/schemas/MappingEntry'
    MappingEntry:
      type: object
      properties:
        cidr4:
          type: array
          items:
            type: string
        cidr6:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````