Skip to main content

How to Ensure Compliance and Data Security When Using the API?

Updated over a month ago

When you use the BrandMentions API, you are responsible for keeping your data, your users, and your systems secure. That means protecting your API keys, handling data carefully, and respecting privacy regulations.

Below are the core principles to follow.

1. Protect your API key

Your API key is a secret credential. Anyone who has it can access your BrandMentions data.

Best practices:

  • Store the key in environment variables or a secret manager, not in code.

  • Never commit it to Git or any public repository.

  • Rotate or regenerate the key if you suspect it has been exposed.

2. Always use HTTPS

All calls to the BrandMentions API must use HTTPS:

  • HTTPS encrypts traffic between your system and the API.

  • This protects API keys, mention data, and any other sensitive information from interception.

Avoid sending API requests over plain HTTP.

3. Respect data privacy laws (GDPR, CCPA, etc.)

If you collect or process personal data, you must comply with relevant privacy regulations such as GDPR and CCPA.

Key points:

  • Be transparent about what data you collect and why.

  • Collect only what you need.

  • Get consent where required.

  • Honor user rights to access, correct, or delete their data.

Consult your legal or compliance team for detailed requirements in your region.

4. Apply the principle of least privilege

Give each system or user only the access it actually needs:

  • Separate environments (dev, staging, production) and keys where possible.

  • Limit who can see or use the API key.

  • Restrict internal tools and users to the minimal data and features required for their role.

This reduces the impact of any accidental leak or misuse.

5. Secure your own infrastructure and storage

BrandMentions secures the API, but you must secure everything on your side.

Good practices:

  • Keep servers, libraries, and dependencies patched and up to date.

  • Use firewalls, access controls, and strong authentication.

  • Encrypt sensitive data at rest and in transit inside your own systems.

  • Store only the data you really need and define retention periods so old data is cleaned up.

By following these guidelines, you can use the BrandMentions API in a way that is secure, compliant, and trustworthy for your organization and your users.

Did this answer your question?