> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Categorized Cookies

Use this API to retrieve categorized cookies by domain.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Consent & Preferences - Cookie Consent",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Cookie Consent APIs are used to integrate external systems and streamline the flow of data with Cookie Consent in the OneTrust Platform."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Cookies",
      "description": "The Cookies APIs are used to manage cookie definitions, categories, and their properties.",
      "externalDocs": {
        "description": "OpenAPI 3.1.0 - Download Definition",
        "url": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-cookie-consent.json"
      }
    }
  ],
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "paths": {
    "/api/cmp/v1/cookies/categorized": {
      "post": {
        "operationId": "getCategorizedCookies",
        "summary": "Get Categorized Cookies",
        "description": "Use this API to retrieve categorized cookies by domain.",
        "tags": [
          "Cookies"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-cookie-consent.json"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategorizedCookiesRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CookiepediaContribsDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "OAUTH2": [
              "COOKIE",
              "COOKIE_READ"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CategorizedCookiesRequestDto": {
        "type": "object",
        "properties": {
          "domain": {
            "description": "The website domain being managed.",
            "type": "string",
            "example": "amazon.com",
            "maxLength": 255,
            "minLength": 1
          },
          "cookieIds": {
            "description": "The list of cookie identifiers.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "example": [
              "f2229953-b4b5-4042-8cb9-b78038cc4c46",
              "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
            ],
            "maxItems": 1000,
            "minItems": 0
          },
          "cookies": {
            "description": "The list of cookie objects containing detailed information about each cookie.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CookieRequestDto"
            },
            "example": [
              {
                "cookieName": "session_id",
                "host": "example.com"
              },
              {
                "cookieName": "user_token",
                "host": "test.com"
              }
            ],
            "maxItems": 1000,
            "minItems": 0
          }
        }
      },
      "CookieRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the cookie.",
            "type": "string",
            "example": "cookie123",
            "minLength": 1
          },
          "host": {
            "description": "The domain or website that created the cookie.",
            "type": "string",
            "example": "amazon.com",
            "minLength": 1
          }
        }
      },
      "CookiepediaContribsDto": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the item.",
            "type": "string",
            "example": "cookie123",
            "maxLength": 255,
            "minLength": 1
          },
          "type": {
            "description": "The type or category classification of the item.",
            "type": "string",
            "example": "First Party",
            "maxLength": 50,
            "minLength": 1
          },
          "host": {
            "description": "The domain or website that created the cookie.",
            "type": "string",
            "example": "amazon.com",
            "maxLength": 255,
            "minLength": 1
          },
          "hostDescription": {
            "description": "The description of the host domain.",
            "type": "string",
            "example": "amazon.com is a website",
            "maxLength": 1000,
            "minLength": 1
          },
          "description": {
            "description": "The description of the item and its intended purpose.",
            "type": "string",
            "example": "This cookie is used for advertising purposes.",
            "maxLength": 1000,
            "minLength": 1
          },
          "firstPartyDescription": {
            "description": "The description of first-party cookies and their usage.",
            "type": "string",
            "example": "This cookie is used for advertising purposes.",
            "maxLength": 1000,
            "minLength": 1
          },
          "thirdPartyDescription": {
            "description": "The description of third-party cookies and their usage.",
            "type": "string",
            "example": "This cookie is used for advertising purposes.",
            "maxLength": 1000,
            "minLength": 1
          },
          "patternKey": {
            "description": "The pattern key used for cookie identification and matching.",
            "type": "string",
            "example": "C1_",
            "maxLength": 255,
            "minLength": 1
          },
          "thirdPartyKey": {
            "description": "The key identifier used for third-party cookie classification.",
            "type": "string",
            "example": "Cookie|cookie123",
            "maxLength": 500,
            "minLength": 1
          },
          "firstPartyKey": {
            "description": "The key identifier used for first-party cookie classification.",
            "type": "string",
            "example": "Cookie|cookie123|amazon.com",
            "maxLength": 500,
            "minLength": 1
          },
          "category": {
            "description": "The category assigned to the cookie for classification purposes.",
            "type": "string",
            "example": "Functionality",
            "maxLength": 255,
            "minLength": 1
          },
          "domainCount": {
            "description": "No of domains where this cookie is active.",
            "type": "integer",
            "format": "int32",
            "example": "0, 1, 2, ..."
          }
        }
      }
    },
    "securitySchemes": {
      "OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "COOKIE": "Cookie Scope gives the user access to read/write operations inside the Cookie Consent module.",
              "COOKIE_READ": "Cookie Read Scope gives the user read-only access to the Cookie Consent module."
            }
          }
        }
      }
    }
  }
}
```