v1

latestOpenAPI 3.1.0Apache 2.02026-07-245981,1853.0 MB
Cookies

Update Cookie

Use this API to update an existing cookie.

🗒 Things to Know

  • There are two types of IDs for cookies: Cookie ID and Domain Cookie ID. The Cookies Results All Domains export can be downloaded from the Categorizations screen in the OneTrust application to select the ID for the cookieId parameter.
  • For manually created cookies, only cookieName, lifespan, an host will be updated.
  • Values must be passed in all the parameters within descriptionTranslations for a cookie translation to be updated.
put/v1/cookies

Request body

cookieIdstring required

ID of the cookie. This value is obtained from Create Cookie API.

cookieNamestring

Name of the cookie.

lifespan'PERSISTENT' | 'SESSION'

Lifespan of the cookie.

hoststring

Host of the cookie.

descriptionstring

Description of the cookie. or less

thirdPartyDescriptionstring

Short text describing the host’s purpose or description of the cookie. It should be 1075 characters or less.

customCategoryNamestring

Unique identifier of a cookie category (Cookie Category ID).

lengthinteger

Length of the cookie lifespan, enter a number greater than 0 if this is a persistent cookie, otherwise leave as 0.

durationType1 | 7 | 30 | 365

Unit of time for the cookie lifespan, enter 1 (for days), 7 (for weeks), 30 (for months), or 365 (for years) based on the time unit the cookie lifespan is measured in.

domainToDeleteIdsstring[]

A list of domain IDs to be unassigned from cookie.

Example request

{
  "customCategoryName": "C0001",
  "domainCookieSource": [
    {
      "domainCookieSourceRequestDtoList": [
        {
          "ResourceUrl": "testUrl"
        }
      ]
    }
  ],
  "descriptionTranslations": [
    {
      "langCode": "EN"
    }
  ]
}

Response

Update completed. Response may include error messages indicating what changes were not complete.

statusstring

Status of the API.

errorMessagesstring[]