---
title: "Publish Script to Website"
method: PUT
path: "/api/cmp/v1/domains/publish"
tags: ["Scripts"]
---

# Publish Script to Website

`PUT /api/cmp/v1/domains/publish`

Use this API to publish the script configuration options for the specified website.

> 👍 
>
> For more information, see [Publishing and Implementing Cookie Consent Scripts](https://my.onetrust.com/s/article/UUID-7478d3b4-18eb-3ac0-a6fd-fb7ebff9f8dc).

## Query parameters

- `scriptType` 'production' | 'test'
- `website` string, required

## Request body

- ScriptPublishRequestDto — Publishes the production or test script for the website that is passed. All available settings for publishing will by default use the saved values from the last publish if not specified.
  - `autoblockEnabled` boolean — Auto-blocking leverages an additional script that must be added to the website to block tracking technologies based on the source setting them. Setting this flag to ’True’ will indicate this script should be published as well. If not specified, this is assumed ‘False’.
  - `enableCommonTrackers` boolean — By default, this flag is ‘False’. Setting to ’True’ indicates to the auto-blocking script to automatically block known trackers.
  - `languageDetectionEnabled` boolean — Indicates whether to automatically detect the language of the website visitor. By default this is ’True’. If not specified, this will default to the last time it was published.
  - `languageDetectionHtml` boolean — Indicates the script should detect the website visitors langauge based on the webpages language.
  - `languageDetectionVisitor` boolean — Indicates the script should detect the website visitors langauge based on their browser language. By default this is ’True’.
  - `languages` string[] — Only required if ‘publishIndividualLanguages=’True’. Indicates which languages to publish.
  - `publishIndividualLanguages` boolean — By default, this flag is ‘False’. Setting to ’True’ indicates you only wish to publish a subset of langauges.
  - `requireReconsent` boolean — Indicates that website visitors should be reprompted with the Consent Management Platform. By default, this is set to ‘False’.
  - `suppressBannerEnabled` boolean — Indicates the banner is manually invoked on the page and should be suppressed upon on initial load. Usually used for SPAs. By default, this flag is ‘False’.
  - `suppressPCEnabled` boolean — Indicates the pref. Center is fetched only upon website visitor interaction with the banner. By default, this flag is ‘False’.

## Response `200`

OK

- PublishScriptDto — Gets the details of the published production or test script for the website that is passed.
  - `autoBlocking` boolean — Auto-blocking leverages an additional script that must be added to the website to block tracking technologies based on the source setting them.
  - `consentPolicyName` string — The consent policy that is assigned to the website being published.
  - `publishVersion` string — The last published version of the script.
  - `publishedDate` string, date-time — The date-time when the script was last published.
  - `reconsentRequired` boolean — Indicates whether website visitors will be reprompted with the Consent Management Platform.
  - `responseMsg` string — Response message indicating whether the publish was initiated successfully or it failed.
  - `userName` string — The tenant GUID of the user which initiated the scan.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500` — Internal Server Error

---

[API](https://skmtc.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/versions/21de3aa0b170/schema)
