---
title: "Create a new scope"
method: POST
path: "/scopes"
tags: ["scopes"]
---

# Create a new scope

`POST /scopes`

## Request body

- ScopeConfig
  - `id` string
  - `name` string, required
  - `scopeType` string, required
  - `subnet` string
  - `gateway` string
  - `dns` string[]
  - `ipam` string[]
  - `endpoints` EndpointConfig[]
    - `id` string, required
    - `name` string, required
    - `scope` string, required
    - `address` string, required
    - `gateway` string, required
    - `container` string, required
    - `ports` string[], required
    - `aliases` string[], required
    - `nameservers` string[], required
    - `trust` string
    - `direct` boolean
    - `macaddress` string
  - `annotations` object
  - `internal` boolean

## Response `201`

Created

- ScopeConfig
  - `id` string
  - `name` string, required
  - `scopeType` string, required
  - `subnet` string
  - `gateway` string
  - `dns` string[]
  - `ipam` string[]
  - `endpoints` EndpointConfig[]
    - `id` string, required
    - `name` string, required
    - `scope` string, required
    - `address` string, required
    - `gateway` string, required
    - `container` string, required
    - `ports` string[], required
    - `aliases` string[], required
    - `nameservers` string[], required
    - `trust` string
    - `direct` boolean
    - `macaddress` string
  - `annotations` object
  - `internal` boolean

## Other responses

- `409` — A scope with that name exists.
- `default` — error

---

[API](https://skmtc.dev/vmware/apis/port-layer-api.md) · [All operations](https://skmtc.dev/vmware/apis/port-layer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vmware/port-layer-api/revisions/5fff0b8814c7/schema)
