---
title: "Publish NetworkContainer via NMAgent"
method: POST
path: "/network/publishnetworkcontainer"
---

# Publish NetworkContainer via NMAgent

`POST /network/publishnetworkcontainer`

Publishes the provided network container via the NMAgent running on the node CNS is running on. CNS acts as a proxy for this request.

## Request body

- PublishNetworkContainerRequest
  - `NetworkID` string
  - `NetworkContainerID` string
  - `JoinNetworkURL` string
  - `CreateNetworkContainerURL` string
  - `CreateNetworkContainerRequestBody` string — The base64 encoded value of the create network container request body

## Response `200`

The request was submitted. Check the return code for success or failure information.

- PublishNetworkContainerResponse
  - `Response` Response
    - `ReturnCode` integer, required — The CNS Error Code
    - `Message` string, required — The error message
  - `PublishErrStr` string
  - `PublishStatusCode` string
  - `PublishResponseBody` string — The base64 encoded response body from NMAgent

---

[API](https://skmtc.net/azure/apis/container-networking-service-cns.md) · [All operations](https://skmtc.net/azure/apis/container-networking-service-cns/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/container-networking-service-cns/versions/b4493fe6b8c8/schema)
