API keys

Create and manage API keys to authenticate requests to the Sendfully API.

API keys authenticate your requests to the Sendfully API. You'll need one before you can send transactional emails or manage resources programmatically.

Create an API key

  1. Go to Settings > API keys
  2. Click Create API key
  3. Give the key a name (something like "Production app" or "Staging server")
  4. Choose a permission level
  5. Click Create key

Permissions

API keys have two permission levels:

PermissionWhat it allows
SendingSend transactional emails via the /v1/emails/send endpoint or SMTP
Full accessSend emails and manage your resources through the API

If your integration only sends emails, use the Sending permission. Use Full access if it also needs to create or update contacts and other resources.

Using an API key

Pass your API key in the Authorization header as a Bearer token:

curl -X POST https://api.sendfully.com/v1/emails/send \  -H "Authorization: Bearer sf_live_..." \  -H "Content-Type: application/json" \  -d '{    "templateId": "welcome_email_a1b2",    "to": "recipient@example.com"  }'

Manage your keys

The Settings > API keys page lists all your keys along with their last-used date, which can be useful for cleaning up keys that haven't been used in a while.

Revoke a key

If a key is compromised or no longer needed:

  1. Go to Settings > API keys
  2. Click the menu on the key you want to revoke
  3. Select Revoke key

Revocation is immediate. Any request using that key will start returning errors. Revoked keys stay visible in the list for your records but can't be reactivated.

Best practices

  • Name keys after the service or environment that uses them ("Production backend", "Staging app") so they're easy to identify when you need to rotate or revoke one.
  • If an integration only sends emails, give it a sending key. Full access keys can be used for integrations that also need to manage contacts or other resources.
  • To rotate a key, create a new one, update your integration, then revoke the old one.
  • Never commit keys to version control. Store them in environment variables or a secrets manager.

See also