Skip to main content

Adding Company Site Cookies

If you need to add a new cookie for a company site registered on illow, you can do so effortlessly by sending a POST request to our API at the following endpoint:

https://api.platform.illow.io/open-api/v1/cookies/{siteId}/cookie
info

Important: Ensure that you include your Access Key in the X-API-Key header for all your requests.

Query Parameters

PropertyTypeDescription
siteIdstringThe unique ID created by illow for your site

Request Body

The request body should be in JSON format and must contain the cookie information you want to add. The structure of the request body should match the following definition:

PropertyTypeRequired?Description
namestringYesThe name of the cookie.
domainstringYesThe domain associated with the cookie.
expiresnumberYesThe expiration timestamp of the cookie in milliseconds.
categorystringYesThe category to which the cookie belongs (necessary, preference, marketing, statistics, unclassified).
descriptionstringNoAdditional information or a description of the cookie's purpose.
isOptInbooleanNoIndicates if the cookie is an opt-in cookie.
wildcardMatchbooleanYesIndicates whether the cookie allows wildcard matches in the domain and path fields.

Response

The API will respond with one of the following status codes:

  • 204: Cookie created successfully.
  • 400: Bad request.
  • 400: Authentication error.
  • 500: Internal server error. The request has failed.

Example

This example demonstrates the creation of a new cookie named "session_id" for the domain "example.com." It collects statistical data for websites and is set to expire at a specific timestamp.

{
"name": "session_id",
"domain": "example.com",
"expires": 1679989200,
"category": "Statistics",
"description": "This cookie collects statistical data",
"isOptIn": true,
"wildcardMatch": false
}