PUT
/
categories
/
{id}
Update category
curl --request PUT \
  --url https://cookiechimp.com/api/v1/categories/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "required": true
}'
{
  "id": "essential",
  "name": "Essential",
  "description": "Cookies essential for website functionality",
  "required": true,
  "created_at": "2023-01-01T00:00:00Z",
  "updated_at": "2023-01-02T00:00:00Z"
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

ID of the resource

Body

application/json

Category to update

name
string
required

Name of the category that is displayed to users

description
string
required

Description of the category that is displayed to users

required
boolean
required

Whether the category is required for the website to function

Response

Updated category

name
string
required

Name of the category that is displayed to users

description
string
required

Description of the category that is displayed to users

required
boolean
required

Whether the category is required for the website to function

id
string

Unique identifier for the category

created_at
string<date-time>

Date and time when the category was created

updated_at
string<date-time>

Date and time when the category was last updated