---
title: "Update Cookie"
method: PUT
path: "/v1/cookies"
tags: ["Cookies"]
---

# Update Cookie

`PUT /v1/cookies`

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.

## Request body

- object
  - `cookieId` string, required — ID of the cookie. This value is obtained from [Create Cookie](/onetrust/reference/createnewcookie) API.
  - `cookieName` string — Name of the cookie.
  - `lifespan` 'PERSISTENT' | 'SESSION' — Lifespan of the cookie.
  - `host` string — Host of the cookie.
  - `description` string — Description of the cookie. or less
  - `thirdPartyDescription` string — Short text describing the host’s purpose or description of the cookie. It should be 1075 characters or less.
  - `customCategoryName` string — Unique identifier of a cookie category (Cookie Category ID).
  - `length` integer — Length of the cookie lifespan, enter a number greater than 0 if this is a persistent cookie, otherwise leave as 0.
  - `durationType` 1 | 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.
  - `domainCookieCategoryList` object[] — A list of domain level categorizations for the cookie.
    - `domainId` string — ID of a domain.
    - `customCategoryName` string — Unique identifier of a cookie category (cookie category ID).
    - `thirdParty` boolean — Flag indicating if the cookie is third-party or first-party, use false if the cookie is first-party.
  - `domainToDeleteIds` string[] — A list of domain IDs to be unassigned from cookie.
  - `domainCookieSource` object[] — Domain Cookie Source to be added.
    - `domainId` string — Unique Identifier of a domain.
    - `domainCookieSourceRequestDtoList` object[]
      - `ResourceUrl` string
  - `domainCookieSourceToDelete` object[] — Domain Cookie Source to be removed.
    - `id` string — Unique Identifier of a domain cookie source.
  - `descriptionTranslations` object[] — Description translations
    - `langCode` string — Language code.
    - `defaultDescription` string — Short text describing what is the purpose of the cookie.
    - `thirdPartyDescription` string — Short text describing the host’s purpose or description. of the cookie

## Response `200`

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

- object
  - `status` string — Status of the API.
  - `errorMessages` string[]

## Other responses

- `400` — Bad Request. **Possible reason**: Invalid cookieid, please check if cookieId passed is correct.
- `401` — Unauthorized.
- `403` — Forbidden. **Possible reasons**: You do not have enough permissions to invoke this endpoint.
- `404` — Not Found.
- `409`
- `429` — Too Many Requests For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).

---

[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)
