---
title: "Add Cookies"
method: POST
path: "/api/cmp/v1/webscans/cookies"
tags: ["Cookies"]
---

# Add Cookies

`POST /api/cmp/v1/webscans/cookies`

Use this API to add cookies.

## Request body

- CookieCreationRequestDto[]
  - `cookieName` string — The name of the cookie.
  - `lifespan` 'SESSION' | 'PERSISTENT', required — The duration for which the cookie remains active before expiring.
  - `host` string — The domain or website that created the cookie.
  - `description` string — The description of the cookie and its intended purpose.
  - `thirdPartyDescription` string — The description of third-party cookies and their usage.
  - `length` integer — Length of the Cookie lifespan, enter a number greater than 0 if this is a PERSISTENT cookie, otherwise leave as 0
  - `durationType` integer, required — The type of duration indicating whether the cookie is session-based or persistent.
  - `cookieId` string, uuid — The unique identifier of the cookie.
  - `customCategoryName` string, required — The custom name assigned to the cookie category.
  - `domainCookieCategoryList` DomainCookieCategoryRequestDto[] — The list of categories assigned to cookies for the specific domain.
    - `domainId` string, uuid — The unique identifier of the domain.
    - `customCategoryName` string — The custom name assigned to the cookie category.
    - `thirdParty` boolean — This flag indicates whether the cookie originates from a third-party source.
    - `description` string — The description of the cookie and its intended purpose.

## Response `201`

Created

- EntityActionResponseDtoCookieEntityDto[]
  - `entityId` string, uuid — The unique identifier of the entity.
  - `entityType` 'SCAN' | 'DOMAIN' | 'COOKIE' — The type of entity such as cookie, tag, page, form, service, or storage.
  - `action` 'ARCHIVE' | 'SCHEDULE' | 'SCHEDULE_CANCEL' | 'EDIT' | 'CREATE' | 'DELETE' — The action that was performed or is to be performed.
  - `message` string — The message or notification text.
  - `content` CookieEntityDto
    - `id` string, uuid — The unique identifier of the item.
    - `name` string — The name or title of the item.
    - `description` string — The description of the cookie and its intended purpose.
    - `thirdPartyDescription` string — The description of third-party cookies and their usage.
    - `host` string — The domain or website that created the cookie.
    - `path` string — The URL path where the cookie is active.
    - `source` 'SCAN' | 'MANUAL' | 'EXTERNALSCANNER' | 'MANUALBULK' — The source from which the data or cookie originated.
    - `cookieLifeSpan` 'SESSION' | 'PERSISTENT' — The duration for which the cookie remains valid.
    - `httpOnly` boolean — This flag indicates whether the cookie can only be accessed via HTTP requests.
    - `secure` boolean — This flag indicates whether the cookie requires a secure HTTPS connection.
    - `length` integer — Length of the Cookie lifespan. This is used in combination with 'durationType'. If 'length' = 5 and 'durationType' = 7, that means 5 weeks.
    - `durationType` integer — The type of duration indicating whether the cookie is session-based or persistent.
  - `success` boolean — This flag indicates whether the operation completed successfully.

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