Scopes & Access Planning
API keys in SonarSend belong to service accounts, not individual users.
Each key should receive only the scopes it actually needs.
How to think about scopes#
Use scopes to answer two questions:
- what data can this integration read or modify
- whether it can take execution-risk actions such as scheduling a send
The most important distinction for broadcast work is:
broadcasts:writecan create and update draftsbroadcasts:schedulecan test-send and schedule sends
Available scopes#
Broadcasts#
broadcasts:readbroadcasts:writebroadcasts:schedule
Contacts and audience#
contacts:readcontacts:writelists:readlists:writesegments:readsegments:write
Sequences#
sequences:readsequences:write
Content#
templates:readtemplates:write
templates:* covers content blocks as well as templates, including the
markdown import/export endpoints.
Reporting and events#
reports:read— the three broadcast reporting endpoints: the summary report, per-link click stats, and bulk metricsevents:write— record custom events. Reading events back is done in the app, so there is noevents:read.
Deliverability and sender setup#
sending-identities:read— sending identities and email types
Data model and compliance#
custom-fields:read— read custom field definitions and their usage counts. There is no write side over the API; fields are defined in the app.suppression:readsuppression:write
Full access#
*
* grants all currently supported external API capabilities.
Every scope listed above unlocks at least one endpoint, and the list is exhaustive. If a capability is not here, it is not reachable with a key at all — there is no scope you can add to get it.
Scope inheritance#
For most domains, write also allows read.
Examples:
- a key with
contacts:writecan also list and read contacts - a key with
segments:writecan also read dynamic segments - a key with
broadcasts:writecan also read broadcasts
This does not apply to execution scopes.
Example:
broadcasts:writedoes not includebroadcasts:schedule
Recommended key patterns#
Content sync key#
Use when an external system creates or updates drafts, but SonarSend users handle final scheduling.
Suggested scopes:
broadcasts:writelists:readsegments:readsending-identities:read
Execution-capable broadcast key#
Use when the integration should create drafts and also schedule or test them.
Suggested scopes:
broadcasts:writebroadcasts:schedulelists:readsegments:readsending-identities:read
CRM sync key#
Use when an external system maintains contact records.
Suggested scopes:
contacts:readcontacts:writecustom-fields:read
Reporting key#
Use when a BI tool or warehouse job only needs metrics.
Suggested scopes:
reports:readbroadcasts:read— to list the broadcasts whose reports you then fetchcontacts:read— only if the job also runs contact exports
Compliance key#
Use when another system needs to read or manage suppressions.
Suggested scopes:
suppression:readsuppression:write
What service-account keys cannot do#
Even a full-access API key is intentionally narrower than a logged-in admin session.
Service-account keys cannot be used for:
- user and admin account management
- API key management
- tenant settings and security actions
- advanced internal-only app routes that are not part of the public API
The app also keeps a number of capabilities to itself deliberately, rather than
by omission: the detailed reporting views behind a broadcast’s report page, a
contact’s event history and the account-wide event feed, custom field creation
and deletion, sending-provider configuration, seed sends, and the bulk
reset_status action. These are read and performed by a signed-in operator.
Practical advice#
- Prefer one key per integration, not one shared key for every system.
- Use the smallest scope set that still lets the integration work.
- Reserve
broadcasts:schedulefor systems that truly need send authority. - Rotate keys if a vendor changes, an environment is retired, or a secret may have leaked.