Scoped API Keys for AI Agents: How to Let Claude Write to Some Things and Not Others

Giving Claude full admin on your CRM is a footgun. Here's how to issue scoped API keys so AI agents have just the permissions they need — and nothing more.

Every "Claude deleted my production database" horror story shares one cause: an agent had broader permissions than it needed. Scoped API keys are the fix.

The Principle

Treat every AI agent like a contractor: give it the smallest possible permission set that lets it do its job, with a per-agent key so audit logs are clear.

Common Scope Patterns in Insurance

Read-Only Research Agent

Scopes: contacts:read, policies:read, commissions:read. Use case: "summarize my book," "find at-risk renewals."

Outreach Drafting Agent

Scopes: contacts:read, policies:read, tasks:write, notes:write. Can draft and queue but not actually send messages without a human approval step.

Renewal Worker

Scopes: policies:read, tasks:write, opportunities:write. Background agent that monitors renewals and creates work items.

Full Admin (use sparingly)

Reserved for one-off cleanup tasks under direct human supervision. Rotate immediately after use.

Per-User Keys vs Per-Agent Keys

Per-user keys let you see who triggered what. Per-agent keys let you see what tool did what. Both. Issue both. Audit logs make incident response 10x easier.

Rotation Hygiene

  • Rotate keys quarterly minimum
  • Rotate immediately on any team member departure
  • Rotate immediately if a key was ever pasted into a chat that wasn't end-to-end encrypted

Where This Fits In unLocked