How to clone or delete the main banner using CookieScript API?
How to clone or delete the main banner using CookieScript API?
The CookieScript Cookie Banner API allows you to manage the CookieScript cookie consent banner. Using the CookieScript Cookie Banner API, you can copy, share, or delete the cookie banner.
The main, or master banner has to be created manually at CookieScript, and only then the banner could be copied or deleted. See the guide on how to create a new banner.
Cloning the main CookieScript cookie consent banner
API works in the same way as the copying functionality, you can try it in your account. Read more about copying the item.
To clone the master banner, use the following parameters:
POST/api/cookie-banner/copy HTTP/1.1
Host: cookie-script.com
Authorization: Bearer {token}
Content-Type: application/json
{
"cid": "{itemId}",
"domain": "{new domain}",
"withreport": "{1 or 0}"
}
Your token: (will be assigned later)
cid: integer item ID
You can find the integer item ID in the URL when you open your banner in the dashboard, for example: 1651430.
You can get the item ID from a response message when making a copy of the banner and store it in your system to insert the banner snippet.
Deleting the main CookieScript cookie consent banner
To delete the master banner, use the following parameters:
DELETE /api/cookie-banner/delete?cid={id} HTTP/1.1
Host: cookie-script.com
Did this answer your question?