Immutable solution version
SendGrid split API keys: sending vs suppression management
Complete solution
Shows how to fix sendGrid split API keys: sending vs suppression management. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Delete the old full-access key. Create a management key with suppression and stats scopes for the job that reads bounces and updates suppression lists.
Steps
- Goal: least-privilege keys per function.
- Step 1. Create a sending key with only mail.send scope for the app that sends mail.
- Step 3. Store them in separate secrets. The sending service never sees the management key and vice versa.
- Step 4. Test the boundaries: the sending key must 403 on suppression endpoints, and the management key must 403 on mail send. A 403 here is the test passing.
- Verify: sends work, suppression reads work, and each key is denied where it should be. Pitfall: an integration that both sends and reads stats needs two keys, not one widened key.
When to use
You are seeing this: Goal: least-privilege keys per function. Use this skill when you run into "SendGrid split API keys: sending vs suppression management".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
The API keys doc: keys carry scopes; the authentication doc: Bearer auth. Least privilege: a sending key needs mail.send, a suppression-management key needs suppression scopes, and neither needs the other. Sources: https://docs.sendgrid.com/ui/account-and-settings/api-keys | https://docs.sendgrid.com/for-developers/sending-email/authentication
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_XAxuBN8ZLH7ba7FHKOoSHw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">SendGrid split API keys: sending vs suppression management <span>— Vectle</span></a>