> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Publish documentation

PUT https://api.getpostman.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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /collections/{collectionId}/public-documentations:
    put:
      operationId: publishDocumentation
      summary: Publish documentation
      description: >
        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.
      tags:
        - collections
      parameters:
        - name: collectionId
          in: path
          description: The collection's unique ID.
          required: true
          schema:
            $ref: '#/components/schemas/collectionUid'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publishDocumentationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '500':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/publishDocumentation'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    collectionUid:
      type: string
      format: uid
      title: collectionUid
    documentationColorSettings:
      type: object
      properties:
        highlight:
          type: string
          description: The hexcode color code for the documentation's highlighting.
        rightSidebar:
          type: string
          description: The hexcode color code for the documentation's right sidebar color.
        topBar:
          type: string
          description: The hexcode color code for the documentation's top bar color.
      description: >-
        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.
      title: documentationColorSettings
    PublishDocumentationDocumentationLayout:
      type: string
      enum:
        - classic-single-column
        - classic-double-column
      default: classic-single-column
      description: >
        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.
      title: PublishDocumentationDocumentationLayout
    documentationMetaTags:
      type: object
      properties:
        name:
          type: string
          description: |
            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:
          type: string
          description: The `name` key's value.
      required:
        - name
        - value
      title: documentationMetaTags
    DocumentationApperanceSettingsDefault:
      type: string
      enum:
        - light
        - dark
      description: >-
        The default color theme (`light` or `dark`). Documentation uses the
        given theme value by default.
      title: DocumentationApperanceSettingsDefault
    DocumentationThemeSettingsName:
      type: string
      enum:
        - dark
        - light
      description: The `light` or `dark` theme.
      title: DocumentationThemeSettingsName
    documentationThemeSettings:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/DocumentationThemeSettingsName'
          description: The `light` or `dark` theme.
        colors:
          $ref: '#/components/schemas/documentationColorSettings'
        logo:
          type:
            - string
            - 'null'
          description: >-
            The URL to the documentation's logo image. By default, public
            documentation uses your team logo.
      title: documentationThemeSettings
    documentationApperanceSettings:
      type: object
      properties:
        default:
          $ref: '#/components/schemas/DocumentationApperanceSettingsDefault'
          description: >-
            The default color theme (`light` or `dark`). Documentation uses the
            given theme value by default.
        themes:
          type: array
          items:
            $ref: '#/components/schemas/documentationThemeSettings'
          description: A list of theme settings for the `light` and `dark` themes.
      description: >-
        Information about the documentation appearance, such as colors and
        theme.
      title: documentationApperanceSettings
    documentationCustomizationSettings:
      type: object
      properties:
        metaTags:
          type: array
          items:
            $ref: '#/components/schemas/documentationMetaTags'
          description: >-
            The key-pair values that contain the documentation's `title` and
            `description` metadata information.
        appearance:
          $ref: '#/components/schemas/documentationApperanceSettings'
      description: Information about the documentation's customization.
      title: documentationCustomizationSettings
    publishDocumentation:
      type: object
      properties:
        environmentUid:
          type: string
          format: uid
          description: >-
            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.
        customColor:
          $ref: '#/components/schemas/documentationColorSettings'
        documentationLayout:
          $ref: '#/components/schemas/PublishDocumentationDocumentationLayout'
          default: classic-single-column
          description: >
            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.
        customization:
          $ref: '#/components/schemas/documentationCustomizationSettings'
      required:
        - customColor
        - customization
      title: publishDocumentation
    publishDocumentationResponse:
      type: object
      properties:
        published:
          type: boolean
          description: If true, the documentation is published.
        documentationLayout:
          type: string
          description: The documentation's default layout style.
        customization:
          $ref: '#/components/schemas/documentationCustomizationSettings'
        publishDate:
          type: string
          format: date-time
          description: The date and time at which the documentation was published.
        publisherId:
          type: string
          description: The user ID of the user that published the documentation.
        environmentUid:
          type: string
          format: uid
          description: >-
            The unique ID of the environment published with the collection
            documentation.
        customColor:
          $ref: '#/components/schemas/documentationColorSettings'
        publicUrl:
          type: string
          format: url
          description: The public URL of the published documentation.
        id:
          type: string
          description: The published documentation's ID.
        collectionId:
          type: string
          description: The collection's ID.
      title: publishDocumentationResponse
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples

### Successful Response



**Request**

```json
undefined
```

**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.getpostman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

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

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.getpostman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations"

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

	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 Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.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'

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.getpostman.com/collections/12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2/public-documentations")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.getpostman.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");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.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.getpostman.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.getpostman.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.getpostman.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.getpostman.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.getpostman.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.getpostman.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.getpostman.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.getpostman.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()
```