MailnapticSign inCreate an accountHelp CenterAPI docs

API Key Scopes

Understand read and write permissions per resource

API Key Scopes

Every Mailnaptic API key is created with a specific set of scopes that control which resources it can access and what operations it can perform. Scopes follow a resource:action pattern, where the resource is the type of data and the action is either read or write.

How scopes work

When an API request is made, Mailnaptic checks whether the API key has the required scope for that endpoint. If the key lacks the necessary scope, the request is rejected with a 403 Forbidden response:

{
  "success": false,
  "error": "API key does not have the required scope: contacts:write",
  "code": "FORBIDDEN"
}

Available scopes

ScopeGrants access to
contacts:readList contacts, get contact details, view tags, view activity
contacts:writeCreate, update, and delete contacts; manage tags and list memberships
lists:readList all lists, get list details and member counts
lists:writeCreate, update, and delete lists
segments:readList segments, get segment details and member previews
segments:writeCreate, update, and delete segments
campaigns:readList campaigns, get campaign details and analytics
campaigns:writeCreate, update, schedule, and send campaigns
transactional:sendSend transactional emails via the API
domains:readList domains and view DNS verification status
domains:writeAdd and remove sending domains
organization:readView organization settings and metadata
organization:writeUpdate organization settings
webhooks:readList webhook endpoints and delivery logs
webhooks:writeCreate, update, and delete webhook endpoints

Read vs. write scopes

A :write scope includes the corresponding :read scope. For example, a key with contacts:write can also read contacts — you do not need to add contacts:read separately.

The transactional:send scope is a special scope that only grants the ability to send transactional emails. It does not include read or write access to campaigns or contacts.

Recommended scope combinations

Match your API key's scopes to its intended use case:

Use caseRecommended scopes
Website signup formcontacts:write, lists:read
Transactional email servicetransactional:send
CRM bidirectional synccontacts:write, lists:read, segments:read
Analytics dashboardcampaigns:read, contacts:read
Full automationcontacts:write, campaigns:write, lists:write, segments:write
Webhook managementwebhooks:write

Security best practices

  • Principle of least privilege: Only grant the scopes a key actually needs. A key used only to add subscribers should not have campaigns:write access.
  • Separate keys per integration: Create a dedicated key for each service or application. If one is compromised, you can revoke it without affecting other integrations.
  • Audit regularly: Review your API keys and their scopes periodically. Revoke keys that are no longer needed.

Note: Scopes are set at key creation time and cannot be changed afterward. To modify scopes, create a new key with the desired permissions and revoke the old one.

·

More in API & Developer