Add API to Private API Network

POST https://api.getpostman.com/network/private

Add API to Private API Network

Publishes the API in the root folder of your [Private API Network]

Role requirements

If your team is using the API Network Manager role (the team-level setting is under Team Settings > Private API Network), please review the following information.

In order to publish an API Version to your Private API Network, you must have one of the following roles added to your user profile:

  • API Network Manager
  • Super Admin

If your user profile does not have the proper permissions to publish an API to your private API network, your API request to publish to your network will receive a 500 HTTP response.

Overview

Body tab

  • elementType — The Private API Network element type. Must be one of the following values:
    • api
    • folder
    • collection
    • workspace

In the elementType object, include the following values:

For APIs and Workspaces:

  • id — A string value that contains the element's ID.
  • parentFolderId — An integer value that contains the element's parent folder ID.

Pre-request Script tab

Sends a message to the Console that the Request is starting to add an API to the team's Private API Network.

Tests tab

Checks for a 201 HTTP response to confirm that the API has been added to the Private API Network.

Request Body

{"api"=>{"id"=>"{{apiId}}", "parentFolderId"=>0}}

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{"id":1,"parentFolderId":0,"updatedAt":"2022-12-07T18:00:39.000Z","updatedBy":12345678,"createdBy":12345678,"createdAt":"2022-12-07T18:00:39.000Z","name":"Billing","description":"The Billing API.","type":"folder"}