Skip to main content
Scopes define what actions an API key can perform. Each scope grants access to specific endpoints and operations.
Scope names follow the pattern resource:action. The wildcard * grants all current and future permissions.

Available Scopes

Campaigns

ScopeDescription
campaigns:createCreate new campaigns
campaigns:readView campaign details, stats, and analytics
campaigns:updateModify campaign configuration
campaigns:deleteDelete campaigns (DRAFT or PAUSED only)
campaigns:pausePause active campaigns
campaigns:activateResume paused campaigns
campaigns:allFull access to all campaign operations

Sender Accounts

ScopeDescription
sender_accounts:createAdd new sender accounts (ColdSend Native or SMTP)
sender_accounts:readView sender account details and stats
sender_accounts:deleteRemove sender accounts
sender_accounts:allFull access to all sender account operations

Leads

ScopeDescription
leads:createUpload leads via CSV or add individual leads
leads:readView lead data and engagement metrics
leads:deleteRemove leads from campaigns (PENDING only)
leads:allFull access to all lead operations

Wildcard

ScopeDescription
*Full access to all resources. Automatically grants access to new scopes.
Only use * for administrative tools. Protect these keys accordingly.

Scope Checking

When an API request is made, ColdSend verifies the API key has the required scope:

Success Example

headers = {"X-API-Key": "cs_live_key_with_campaigns_read"}

response = requests.get(
    f"{base_url}/api/public/v1/campaigns",
    headers=headers
)
# Returns 200 OK

Insufficient Scope Example

{
  "detail": "Missing required scopes: campaigns:write",
  "required": ["campaigns:write"],
  "granted": ["sender_accounts:read"]
}
Status: 403 Forbidden

Best Practices

  1. Principle of least privilege — Grant only the minimum scopes needed
  2. Separate keys by function — Different integrations should use different keys
  3. Audit regularly — Review which scopes your keys actually use
  4. Use compound scopescampaigns:all is cleaner than listing each scope individually

Next Steps

Authentication

Learn how to authenticate requests using API keys.

API Keys

Create and manage API keys for your integrations.