Authorization header. This page covers what is known about key scopes, how to store keys safely, and how to rotate them without downtime.
Known scopes
The BosonMail README mentions two permission scopes:
Apply the principle of least privilege: use a key with only the scopes needed for a given service. For example, a status dashboard might only need
email:read, while a transactional backend needs email:send.
The full list of available scopes, and whether BosonWare supports scoped keys, requires confirmation from BosonWare.
Storing API keys
Never hardcode keys in source code or commit them to version control. Use one of the following approaches.Environment variables
Load the key from the environment at runtime and validate it before constructing the client.lib/bosonmail.ts
Platform secrets
Key rotation
Rotate keys periodically and immediately after any suspected leak. The general procedure is:1
Create a new key
Generate a new API key in the BosonWare dashboard or by contacting support. Do not delete the old key yet.
2
Update your services
Deploy the new key to all environments that use BosonMail. Keep the old key active during the transition.
3
Verify traffic
Confirm that emails are sending and status lookups are working with the new key.
4
Revoke the old key
Remove the old key from the dashboard or request revocation via support@bosonware.com.
The exact BosonWare dashboard steps for creating and revoking keys require confirmation. Contact support@bosonware.com for assistance.
If a key is leaked
- Revoke the leaked key immediately via the dashboard or by emailing support@bosonware.com.
- Rotate to a new key using the procedure above.
- Audit recent send logs and status checks for unexpected activity.
- Review access controls to prevent recurrence.
Next steps
Security best practices
Server-side-only usage, PII handling, and dependency hygiene.
Client configuration
Configure API base URL, timeouts, and other options.
Error codes
Understand unauthorized and not_found errors.
Troubleshooting
Fix common authentication and configuration problems.