AI Data Protection: What to Send to an AI and What to Keep
Connecting an AI service to your site or app? Learn which data is safe to send, which must stay out, and how to set clear rules.
Send an AI service only the minimum data it needs to do its job, and keep identity, health, payment and confidential business data out of the request. This guide shows how to sort your data, mask what is risky, and check your vendor before launch.
The default rule: if the task does not need it, do not send it
Most data leaks in AI projects are not attacks. They are convenience. A developer pastes the whole customer record into a prompt because it is easier than choosing three fields.
We see this often in the field. A support chatbot gets the full order history, address and phone number, when it only needed the order status. The answer is the same, but the exposure is much larger.
Treat every request as a disclosure to a third party. Ask one question before each field goes out: would the answer get worse without it? If not, remove it.
Sorting your data into three groups
Before any code is written, list the data your product touches. Then place each item in one of three groups. This takes an afternoon and prevents months of argument later.
The first group is data that can go out freely, such as public product descriptions or published blog text. The second is data that can go out only after masking. The third is data that never leaves your systems.
Group | Examples | Rule |
|---|---|---|
Free to send | Public pages, product specs, generic FAQ text | Send as is |
Send after masking | Support messages, order notes, internal documents | Remove names and identifiers first |
Never send | Identity numbers, health records, card data, passwords, API keys | Keep inside your systems |
Personal data and Turkish law: what to watch
In Turkey, personal data is governed by the Personal Data Protection Law (KVKK). Names, phone numbers, email addresses and identity numbers are personal data. Health data and biometric data fall under the stricter special category.
Sending such data to a provider that processes it abroad can count as a cross-border transfer. That has its own conditions. We are not lawyers, so confirm your exact obligations with your legal counsel or the KVKK Authority guidance.
One practical point: your privacy notice should describe that an AI service is part of the processing. A notice written before the integration is often out of date afterwards.
Masking before the request leaves your server
Masking means replacing identifying details with placeholders before the text reaches the AI. A message such as "Ayşe Demir, 0532..., wants a refund" becomes "[CUSTOMER], [PHONE], wants a refund".
Do this on your own server, not in the browser and not at the provider. Once raw text has left, you cannot pull it back.
Test your masking with real, messy text. Customers write phone numbers with spaces, dots and typos. A rule that catches only the clean format will miss many of them.
- Mask names, phone numbers, emails, addresses and identity numbers
- Strip file metadata from uploaded documents
- Remove secrets such as tokens and passwords from logs and prompts
- Re-insert real values only after the answer returns, on your side
Questions to put to your AI vendor
Not all providers treat your data the same way. Some use submitted content to improve their models by default. Others allow you to switch that off, or never do it on business plans.
Read the data processing terms, not just the pricing page. Look for where data is stored, how long it is kept, and who can access it.
- Is our data used to train models, and can we opt out in writing?
- Where is data processed and stored?
- How long are prompts and answers retained?
- Can we request deletion?
- Is there a signed data processing agreement?
Keys, logs and access: the quiet leaks
Even with clean prompts, leaks happen elsewhere. API keys committed to a code repository are a classic case. Keep them in server-side environment variables and rotate them if you suspect exposure.
Logs are the second weak point. Teams store full prompts and answers for debugging, then forget them. Log only what you need, mask it, and set an expiry.
Finally, limit who inside your company can read these records. Debugging access for everyone is convenient and hard to defend later.
Test with fake data first, then go live in small steps
Run the first version with invented records. Check what actually leaves your server by looking at the outgoing requests, not by trusting the design document.
Then release to a small group. Review a sample of requests every week for the first month. Mistakes show up quickly when someone is actually looking.
Write down the rules in one page: what is sent, what is masked, what is never sent, and who approves changes. A short, living document beats a long policy no one reads.
Start with a data list this week
Your next step is small. List every field your product could send to an AI, and place each in the free, masked or never group.
Then add masking on your server, review your vendor terms, and move keys out of code. If the integration touches health, legal or financial data, involve your legal advisor before launch.
If you want a second pair of eyes on your integration design, our team can review the data flow with you.
Related service
AI search optimisationSee how we work →How did this land for you?
Be the first to react
Found it useful? Share it:
Frequently asked questions
Which personal data should not be sent to an AI service?
Keep identity numbers, health records, card data, passwords and API keys inside your systems. Confidential business data should also stay out of the request. Send only the minimum the task needs, and ask whether the answer would get worse without a field before sending it.
How do you protect personal data when having an AI summarize documents?
Mask identifying details on your own server before the text reaches the AI, replacing names, phone numbers, emails, addresses and identity numbers with placeholders. Strip metadata from uploaded files and remove secrets such as tokens and passwords. Real values can be re-inserted on your side after the answer returns.
Does using an AI service count as a cross-border data transfer under KVKK?
Sending personal data to a provider that processes it abroad can count as a cross-border transfer, which has its own conditions. The article is not legal advice, so confirm your exact obligations with your legal counsel or the KVKK Authority guidance.
Should the privacy notice be updated when you start using AI?
Yes, your privacy notice should describe that an AI service is part of the data processing. A notice written before the integration is often out of date afterwards, so review it when the integration goes live.
What questions should you ask an AI vendor before setup?
Ask whether your data is used to train models and whether you can opt out in writing, where data is processed and stored, and how long prompts and answers are retained. Also ask whether you can request deletion and whether a signed data processing agreement is available. Read the data processing terms, not just the pricing page.
Related articles
- Web & Software
AI Project Cost: How to Control It With Model Choice and Limits
AI project cost grows through model choice and unchecked usage. Learn how to pick the right model, set limits and track spending before the bill surprises you.
4 min read - Web & Software
AI Assistant for Website: How to Stop It Making Things Up
An AI assistant for your website can answer visitors without inventing facts. Learn how to ground it in your content, set limits and test it.
5 min read - Web & Software
Where to Start with AI for Business: Pick One Repetitive Task
Starting with ai for business is easier when you pick one repetitive task. Here is how to choose it, test it, and know when to stop.
2 min read