Skip to content

Custom Consent Themes

Delete an existing custom consent theme. The query has the following JSON shape:

[
{
"account_id": "<string>",
"website_id": "<string>",
"id": "<string>"
}
]

The query must have 1 or more request objects and will respond with the same number of success or error objects. Once constructed the object must be URL encoded and be the value for the query parameter.

If the entire request is in error or invalid, the result JSON will be a request error.

Multiple deletion requests

DELETE https://api.termly.io/v1/websites/custom_consent_themes?query=%5B%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_124%22%2C%22id%22%3A%22cct_123%22%7D%2C%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_12%22%7D%5D
[
{
"account_id": "acct_123",
"website_id": "web_124",
"id": "cct_123"
},
{
"account_id": "acct_123",
"website_id": "web_123",
"id": "cct_12"
}
]
[
{
"account_id": "acct_123",
"website_id": "web_124",
"id": "cct_123",
"_idx": 0
},
{
"account_id": "acct_123",
"website_id": "web_123",
"id": "cct_12",
"_idx": 1
}
]

Multiple requests with one failure

DELETE https://api.termly.io/v1/websites/custom_consent_themes?query=%5B%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_124%22%2C%22id%22%3A%22cct_123%22%7D%2C%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_12%22%7D%2C%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_123%22%7D%5D
[
{
"account_id": "acct_123",
"website_id": "web_124",
"id": "cct_123"
},
{
"account_id": "acct_123",
"website_id": "web_123",
"id": "cct_12"
},
{
"account_id": "acct_123",
"website_id": "web_123",
"id": "cct_123"
}
]
[
{
"account_id": "acct_123",
"website_id": "web_124",
"id": "cct_123",
"_idx": 0
},
{
"account_id": "acct_123",
"website_id": "web_123",
"id": "cct_12",
"_idx": 1
},
{
"error": "custom_consent_theme_not_found",
"_idx": 2
}
]

A theme that is still in use

DELETE https://api.termly.io/v1/websites/custom_consent_themes?query=%5B%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_12%22%7D%2C%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_123%22%7D%5D
[
{
"account_id": "acct_123",
"website_id": "web_123",
"id": "cct_12"
},
{
"account_id": "acct_123",
"website_id": "web_123",
"id": "cct_123"
}
]
[
{
"account_id": "acct_123",
"website_id": "web_123",
"id": "cct_12",
"_idx": 0
},
{
"error": "custom_consent_theme_in_use",
"_idx": 1
}
]

custom_consent_theme_in_use means one of the website’s banner regions, or the website’s style, still uses the theme, so it was not deleted. Switch them to another theme first, then delete it again.