This feature is in beta. Get in touch with our team to request early access.

Our API allows you to perform all consent-related actions programmatically, providing the flexibility to create a completely custom UI.

Refer to our comprehensive API Reference for a detailed list of available endpoints, request/response formats, and examples.

Disabling CookieChimp’s UI

You can disable our JS widget by simply not adding our script to your website. This will prevent CookieChimp from showing the consent banner and the consent management interface.

If you would like to disable the consent banner but still show the consent management interface, you can update this in your account setting to not automatically show the consent banner. You can then use our API to show the consent management interface when the user clicks on a button or link. This would still require you to add our script to your website.

Building Your Custom UI

With CookieChimp’s headless approach, you have complete freedom to design the consent management interface. Here are some guidelines:

  • Consistency with Branding: Ensure your UI aligns with your brand’s style and ethos.
  • User Experience: Focus on creating an intuitive and seamless experience for users to manage their consent preferences.
  • Accessibility: Make sure your UI is accessible to all users, following WCAG guidelines.

Best Practices

  • Responsive Design: Your UI should work seamlessly across devices.
  • Clear Consent Options: Users should easily understand their choices and implications.
  • Feedback Loops: Provide immediate feedback to users after they make a choice.

Once the user has set their cookie preferences, you need to make an API call to CookieChimp to store their consent preferences. You can do this by calling the Update Consent endpoint with your account ID. This can be called from either the client-side or server-side.

// JavaScript snippet to handle consent
fetch("https://cookiechimp.com/api/consent", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    account_id: "abc123",
    user_id: "123",

    visitor_action: "consent",
    url: "https://www.example.com",

    // other parameters
  }),
})
  .then((response) => response.json())
  .then((data) => console.log(data));

Read our API Reference for a detailed list of available data you can store for each consent.