> This page is for Postman API Docs.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Publish documentation

PUT https://api.postman.com/collections/{collectionId}/public-documentations
Content-Type: application/json

Publishes a collection's documentation. This makes it publicly available to anyone with the link to the documentation.

**Note:**

- Your [Postman plan](https://www.postman.com/pricing/) impacts your use of these endpoints:
  - For **Free** and **Solo** users, you must have permissions to edit the collection.
  - If [API Governance and Security](https://learning.postman.com/docs/api-governance/configurable-rules/configurable-rules-overview/) is enabled for your [**Enterprise**](https://www.postman.com/pricing/) team, only users with the [Community Manager role](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles) can publish documentation.
- Publishing is only supported for collections with HTTP requests.
- You cannot publish a collection added to an API.


Reference: https://learning.postman.com/api-docs/api-reference/collections/publish-documentation

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Servers

- `https://api.postman.com` (https://api.postman.com, default)
- `https://api.eu.postman.com` (https://api.eu.postman.com)

## Request

### Path parameters

- `collectionId` (string, required) — The collection's unique ID.

### Body (application/json)

This endpoint expects a publishDocumentation.

- `customColor` (documentationColorSettings, required) — The theme's colors, in six digit hexcode. The values in this object must match the hexcode values of either the `light` or `dark` theme defined in the `appearance` object.
- `customization` (documentationCustomizationSettings, required) — Information about the documentation's customization.
- `environmentUid` (string, optional) — The unique ID of the environment to publish with the documentation. The initial values of all variables are published with the documentation. Make certain they don't contain sensitive information such as passwords or tokens.
- `documentationLayout` (enum, optional, default: classic-single-column) — The documentation's default layout style: - `classic-single-column` — Displays sample code inline beneath each request. - `classic-double-column` — Displays sample code in a column next to the documentation.
  - Allowed values: `classic-single-column`, `classic-double-column`

## Response

### 200

Successful Response

- `published` (boolean, optional) — If true, the documentation is published.
- `documentationLayout` (string, optional) — The documentation's default layout style.
- `customization` (documentationCustomizationSettings, optional) — Information about the documentation's customization.
- `publishDate` (datetime, optional) — The date and time at which the documentation was published.
- `publisherId` (string, optional) — The user ID of the user that published the documentation.
- `environmentUid` (string, optional) — The unique ID of the environment published with the collection documentation.
- `customColor` (documentationColorSettings, optional) — The theme's colors, in six digit hexcode. The values in this object must match the hexcode values of either the `light` or `dark` theme defined in the `appearance` object.
- `publicUrl` (string, optional) — The public URL of the published documentation.
- `id` (string, optional) — The published documentation's ID.
- `collectionId` (string, optional) — The collection's ID.

## Errors

### 400 Bad Request Error

Bad Request

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### 401 Unauthorized Error

Unauthorized

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### 403 Forbidden Error

Forbidden

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### 500 Internal Server Error

Unauthorized

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

## Types

### documentationColorSettings

The theme's colors, in six digit hexcode. The values in this object must match the hexcode values of either the `light` or `dark` theme defined in the `appearance` object.

- `highlight` (string, optional) — The hexcode color code for the documentation's highlighting.
- `rightSidebar` (string, optional) — The hexcode color code for the documentation's right sidebar color.
- `topBar` (string, optional) — The hexcode color code for the documentation's top bar color.

### documentationCustomizationSettings

Information about the documentation's customization.

- `metaTags` (list of documentationMetaTags, optional) — The key-pair values that contain the documentation's `title` and `description` metadata information.
- `appearance` (documentationApperanceSettings, optional) — Information about the documentation appearance, such as colors and theme.

### CommonErrorTypeTitleDetailStatusType

The type of error.

- string
- string

### documentationMetaTags

- `name` (string, required) — The key's name: - `title` — The title of your documentation. This value appears in relevant search queries and browser tabs. By default, the system uses the collection's name for the documentation title. - `description` — The documentation's description. This provides brief information about your document and lets users know what it contains. By default, the system uses the collection's description content.
- `value` (string, required) — The `name` key's value.

### documentationApperanceSettings

Information about the documentation appearance, such as colors and theme.

- `default` (enum, optional) — The default color theme (`light` or `dark`). Documentation uses the given theme value by default.
  - Allowed values: `light`, `dark`
- `themes` (list of documentationThemeSettings, optional) — A list of theme settings for the `light` and `dark` themes.

### documentationThemeSettings

- `name` (enum, optional) — The `light` or `dark` theme.
  - Allowed values: `dark`, `light`
- `colors` (documentationColorSettings, optional) — The theme's colors, in six digit hexcode. The values in this object must match the hexcode values of either the `light` or `dark` theme defined in the `appearance` object.
- `logo` (string, optional, nullable) — The URL to the documentation's logo image. By default, public documentation uses your team logo.

## Examples

### Successful Response

**Response**

```json
{
  "published": true,
  "documentationLayout": "classic-single-column",
  "customization": {
    "metaTags": [
      {
        "name": "description",
        "value": "This documentation contains the endpoints for the Billing API."
      },
      {
        "name": "title",
        "value": "Billing API"
      }
    ],
    "appearance": {
      "default": "dark",
      "themes": [
        {
          "name": "dark",
          "colors": {
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          },
          "logo": "<s3_url>/<cloudfront_url>"
        },
        {
          "name": "light",
          "colors": {
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          },
          "logo": "<s3_url>/<cloudfront_url>"
        }
      ]
    }
  },
  "publishDate": "2025-03-24T17:33:10.000Z",
  "publisherId": "12345678",
  "environmentUid": "12345678-f84a5105-a495-49db-aa6b-db02c9ed1023",
  "customColor": {
    "highlight": "EF5B25",
    "rightSidebar": "303030",
    "topBar": "FFFFFF"
  },
  "publicUrl": "https://documenter.getpostman-beta.com/view/12345678/6n31uVF",
  "id": "6n31uVF",
  "collectionId": "ea39a259-0c9b-4a5c-a2e6-bddadb8f8e6f"
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations"

headers = {"x-api-key": "<apiKey>"}

response = requests.put(url, headers=headers)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations';
const options = {method: 'PUT', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Publish Documentation

**Request**

```json
{
  "customColor": {
    "highlight": "EF5B25",
    "rightSidebar": "303030",
    "topBar": "FFFFFF"
  },
  "customization": {
    "metaTags": [
      {
        "name": "title",
        "value": "Billing API"
      },
      {
        "name": "description",
        "value": "This documentation contains the endpoints for the Billing API."
      }
    ],
    "appearance": {
      "default": "dark",
      "themes": [
        {
          "name": "dark",
          "colors": {
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          },
          "logo": "<s3_url>/<cloudfront_url>"
        },
        {
          "name": "light",
          "colors": {
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          },
          "logo": "<s3_url>/<cloudfront_url>"
        }
      ]
    }
  },
  "environmentUid": "12345678-f84a5105-a495-49db-aa6b-db02c9ed1023",
  "documentationLayout": "classic-single-column"
}
```

**Response**

```json
{
  "published": true,
  "documentationLayout": "classic-single-column",
  "customization": {
    "metaTags": [
      {
        "name": "description",
        "value": "This documentation contains the endpoints for the Billing API."
      },
      {
        "name": "title",
        "value": "Billing API"
      }
    ],
    "appearance": {
      "default": "dark",
      "themes": [
        {
          "name": "dark",
          "colors": {
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          },
          "logo": "<s3_url>/<cloudfront_url>"
        },
        {
          "name": "light",
          "colors": {
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          },
          "logo": "<s3_url>/<cloudfront_url>"
        }
      ]
    }
  },
  "publishDate": "2025-03-24T17:33:10.000Z",
  "publisherId": "12345678",
  "environmentUid": "12345678-f84a5105-a495-49db-aa6b-db02c9ed1023",
  "customColor": {
    "highlight": "EF5B25",
    "rightSidebar": "303030",
    "topBar": "FFFFFF"
  },
  "publicUrl": "https://documenter.getpostman-beta.com/view/12345678/6n31uVF",
  "id": "6n31uVF",
  "collectionId": "ea39a259-0c9b-4a5c-a2e6-bddadb8f8e6f"
}
```

**SDK Code**

```python Publish Documentation
import requests

url = "https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations"

payload = {
    "customColor": {
        "highlight": "EF5B25",
        "rightSidebar": "303030",
        "topBar": "FFFFFF"
    },
    "customization": {
        "metaTags": [
            {
                "name": "title",
                "value": "Billing API"
            },
            {
                "name": "description",
                "value": "This documentation contains the endpoints for the Billing API."
            }
        ],
        "appearance": {
            "default": "dark",
            "themes": [
                {
                    "name": "dark",
                    "colors": {
                        "highlight": "EF5B25",
                        "rightSidebar": "303030",
                        "topBar": "FFFFFF"
                    },
                    "logo": "<s3_url>/<cloudfront_url>"
                },
                {
                    "name": "light",
                    "colors": {
                        "highlight": "EF5B25",
                        "rightSidebar": "303030",
                        "topBar": "FFFFFF"
                    },
                    "logo": "<s3_url>/<cloudfront_url>"
                }
            ]
        }
    },
    "environmentUid": "12345678-f84a5105-a495-49db-aa6b-db02c9ed1023",
    "documentationLayout": "classic-single-column"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Publish Documentation
const url = 'https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"customColor":{"highlight":"EF5B25","rightSidebar":"303030","topBar":"FFFFFF"},"customization":{"metaTags":[{"name":"title","value":"Billing API"},{"name":"description","value":"This documentation contains the endpoints for the Billing API."}],"appearance":{"default":"dark","themes":[{"name":"dark","colors":{"highlight":"EF5B25","rightSidebar":"303030","topBar":"FFFFFF"},"logo":"<s3_url>/<cloudfront_url>"},{"name":"light","colors":{"highlight":"EF5B25","rightSidebar":"303030","topBar":"FFFFFF"},"logo":"<s3_url>/<cloudfront_url>"}]}},"environmentUid":"12345678-f84a5105-a495-49db-aa6b-db02c9ed1023","documentationLayout":"classic-single-column"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Publish Documentation
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations"

	payload := strings.NewReader("{\n  \"customColor\": {\n    \"highlight\": \"EF5B25\",\n    \"rightSidebar\": \"303030\",\n    \"topBar\": \"FFFFFF\"\n  },\n  \"customization\": {\n    \"metaTags\": [\n      {\n        \"name\": \"title\",\n        \"value\": \"Billing API\"\n      },\n      {\n        \"name\": \"description\",\n        \"value\": \"This documentation contains the endpoints for the Billing API.\"\n      }\n    ],\n    \"appearance\": {\n      \"default\": \"dark\",\n      \"themes\": [\n        {\n          \"name\": \"dark\",\n          \"colors\": {\n            \"highlight\": \"EF5B25\",\n            \"rightSidebar\": \"303030\",\n            \"topBar\": \"FFFFFF\"\n          },\n          \"logo\": \"<s3_url>/<cloudfront_url>\"\n        },\n        {\n          \"name\": \"light\",\n          \"colors\": {\n            \"highlight\": \"EF5B25\",\n            \"rightSidebar\": \"303030\",\n            \"topBar\": \"FFFFFF\"\n          },\n          \"logo\": \"<s3_url>/<cloudfront_url>\"\n        }\n      ]\n    }\n  },\n  \"environmentUid\": \"12345678-f84a5105-a495-49db-aa6b-db02c9ed1023\",\n  \"documentationLayout\": \"classic-single-column\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Publish Documentation
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"customColor\": {\n    \"highlight\": \"EF5B25\",\n    \"rightSidebar\": \"303030\",\n    \"topBar\": \"FFFFFF\"\n  },\n  \"customization\": {\n    \"metaTags\": [\n      {\n        \"name\": \"title\",\n        \"value\": \"Billing API\"\n      },\n      {\n        \"name\": \"description\",\n        \"value\": \"This documentation contains the endpoints for the Billing API.\"\n      }\n    ],\n    \"appearance\": {\n      \"default\": \"dark\",\n      \"themes\": [\n        {\n          \"name\": \"dark\",\n          \"colors\": {\n            \"highlight\": \"EF5B25\",\n            \"rightSidebar\": \"303030\",\n            \"topBar\": \"FFFFFF\"\n          },\n          \"logo\": \"<s3_url>/<cloudfront_url>\"\n        },\n        {\n          \"name\": \"light\",\n          \"colors\": {\n            \"highlight\": \"EF5B25\",\n            \"rightSidebar\": \"303030\",\n            \"topBar\": \"FFFFFF\"\n          },\n          \"logo\": \"<s3_url>/<cloudfront_url>\"\n        }\n      ]\n    }\n  },\n  \"environmentUid\": \"12345678-f84a5105-a495-49db-aa6b-db02c9ed1023\",\n  \"documentationLayout\": \"classic-single-column\"\n}"

response = http.request(request)
puts response.read_body
```

```java Publish Documentation
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"customColor\": {\n    \"highlight\": \"EF5B25\",\n    \"rightSidebar\": \"303030\",\n    \"topBar\": \"FFFFFF\"\n  },\n  \"customization\": {\n    \"metaTags\": [\n      {\n        \"name\": \"title\",\n        \"value\": \"Billing API\"\n      },\n      {\n        \"name\": \"description\",\n        \"value\": \"This documentation contains the endpoints for the Billing API.\"\n      }\n    ],\n    \"appearance\": {\n      \"default\": \"dark\",\n      \"themes\": [\n        {\n          \"name\": \"dark\",\n          \"colors\": {\n            \"highlight\": \"EF5B25\",\n            \"rightSidebar\": \"303030\",\n            \"topBar\": \"FFFFFF\"\n          },\n          \"logo\": \"<s3_url>/<cloudfront_url>\"\n        },\n        {\n          \"name\": \"light\",\n          \"colors\": {\n            \"highlight\": \"EF5B25\",\n            \"rightSidebar\": \"303030\",\n            \"topBar\": \"FFFFFF\"\n          },\n          \"logo\": \"<s3_url>/<cloudfront_url>\"\n        }\n      ]\n    }\n  },\n  \"environmentUid\": \"12345678-f84a5105-a495-49db-aa6b-db02c9ed1023\",\n  \"documentationLayout\": \"classic-single-column\"\n}")
  .asString();
```

```php Publish Documentation
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations', [
  'body' => '{
  "customColor": {
    "highlight": "EF5B25",
    "rightSidebar": "303030",
    "topBar": "FFFFFF"
  },
  "customization": {
    "metaTags": [
      {
        "name": "title",
        "value": "Billing API"
      },
      {
        "name": "description",
        "value": "This documentation contains the endpoints for the Billing API."
      }
    ],
    "appearance": {
      "default": "dark",
      "themes": [
        {
          "name": "dark",
          "colors": {
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          },
          "logo": "<s3_url>/<cloudfront_url>"
        },
        {
          "name": "light",
          "colors": {
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          },
          "logo": "<s3_url>/<cloudfront_url>"
        }
      ]
    }
  },
  "environmentUid": "12345678-f84a5105-a495-49db-aa6b-db02c9ed1023",
  "documentationLayout": "classic-single-column"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Publish Documentation
using RestSharp;

var client = new RestClient("https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"customColor\": {\n    \"highlight\": \"EF5B25\",\n    \"rightSidebar\": \"303030\",\n    \"topBar\": \"FFFFFF\"\n  },\n  \"customization\": {\n    \"metaTags\": [\n      {\n        \"name\": \"title\",\n        \"value\": \"Billing API\"\n      },\n      {\n        \"name\": \"description\",\n        \"value\": \"This documentation contains the endpoints for the Billing API.\"\n      }\n    ],\n    \"appearance\": {\n      \"default\": \"dark\",\n      \"themes\": [\n        {\n          \"name\": \"dark\",\n          \"colors\": {\n            \"highlight\": \"EF5B25\",\n            \"rightSidebar\": \"303030\",\n            \"topBar\": \"FFFFFF\"\n          },\n          \"logo\": \"<s3_url>/<cloudfront_url>\"\n        },\n        {\n          \"name\": \"light\",\n          \"colors\": {\n            \"highlight\": \"EF5B25\",\n            \"rightSidebar\": \"303030\",\n            \"topBar\": \"FFFFFF\"\n          },\n          \"logo\": \"<s3_url>/<cloudfront_url>\"\n        }\n      ]\n    }\n  },\n  \"environmentUid\": \"12345678-f84a5105-a495-49db-aa6b-db02c9ed1023\",\n  \"documentationLayout\": \"classic-single-column\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Publish Documentation
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "customColor": [
    "highlight": "EF5B25",
    "rightSidebar": "303030",
    "topBar": "FFFFFF"
  ],
  "customization": [
    "metaTags": [
      [
        "name": "title",
        "value": "Billing API"
      ],
      [
        "name": "description",
        "value": "This documentation contains the endpoints for the Billing API."
      ]
    ],
    "appearance": [
      "default": "dark",
      "themes": [
        [
          "name": "dark",
          "colors": [
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          ],
          "logo": "<s3_url>/<cloudfront_url>"
        ],
        [
          "name": "light",
          "colors": [
            "highlight": "EF5B25",
            "rightSidebar": "303030",
            "topBar": "FFFFFF"
          ],
          "logo": "<s3_url>/<cloudfront_url>"
        ]
      ]
    ]
  ],
  "environmentUid": "12345678-f84a5105-a495-49db-aa6b-db02c9ed1023",
  "documentationLayout": "classic-single-column"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```