API authentication and tokens

API authentication guide: create and manage API tokens in SendSeven with scoped permissions and secure your integrations with proper authentication practices.

~2 minBeginnerMarch 12, 2026

Definition

API Tokens

API tokens are secure credentials that allow your applications and integrations to authenticate with SendSeven's REST API without exposing your password. Instead of using a single master token with unlimited access, SendSeven supports scoped tokens — each token can be restricted to specific permissions like reading messages, sending broadcasts, managing webhooks, or accessing reports. This follows security best practices by enforcing the principle of least privilege. You can create unlimited tokens, each with different names and permissions, and revoke any token instantly if it is compromised or no longer needed.

Before you start

Before you start

Make sure you have the following ready before creating your first API token.

A SendSeven account (sign up free at app.sendseven.com)
Admin or Owner role in your SendSeven workspace

How it works

1

Open API Tokens in Settings

Navigate to Settings → API Tokens. If you haven't created any tokens yet, you'll see the empty state — "No API tokens yet". Click "+ Create Token" to get started.

SendSeven Settings page showing the empty API Tokens section before any tokens are created
2

Name your token and select scopes

Give your token a descriptive name (e.g. "CRM Token"), then choose the permission scopes it needs. Click "Create Token" when ready.

Create API Token dialog showing token name field and permission scopes such as read, write, and webhooks
3

Copy your token — it's shown only once

Your new token appears immediately after creation. This is the only time it will be displayed — copy it now and store it securely in a password manager or secrets vault.

Save this token now!

This is the only time you'll see the full token. If you lose it, you'll need to create a new one. Store it securely in your environment variables or a secrets manager.
Token created successfully popup displaying the generated API token to copy before it disappears

Done!

Your token is now active and listed in API Tokens with all its assigned scopes visible. You can revoke it at any time and create additional tokens for different integrations whenever needed. Open API Tokens settings →

Active API token entry showing assigned permission scopes and management options in SendSeven

Using the API

Include your token as a Bearer token in the Authorization header of every request. Here are examples in multiple languages.

Base URL

Bash·API Base URL
https://api.sendseven.com/api/v1

List all contacts

Bash·cURL — GET contacts
curl -X GET "https://api.sendseven.com/api/v1/contacts" \
  -H "Authorization: Bearer s7_api_your_token_here" \
  -H "Content-Type: application/json"

Send a WhatsApp message

Bash·cURL — POST message
curl -X POST "https://api.sendseven.com/api/v1/messages" \
  -H "Authorization: Bearer s7_api_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_id": "contact_d4e5f6a7",
    "channel_id": "channel_wa_001",
    "text": "Hello from SendSeven!",
    "message_type": "text"
  }'

Node.js (fetch)

JavaScript·Node.js — GET contacts
const response = await fetch('https://api.sendseven.com/api/v1/contacts', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer s7_api_your_token_here',
    'Content-Type': 'application/json'
  }
});

const contacts = await response.json();
console.log(contacts);

Python (requests)

Python·Python — GET contacts
import requests

response = requests.get(
    'https://api.sendseven.com/api/v1/contacts',
    headers={
        'Authorization': 'Bearer s7_api_your_token_here',
        'Content-Type': 'application/json'
    }
)

contacts = response.json()
print(contacts)

Security best practices

Use environment variables

Never hardcode tokens in your source code. Use environment variables or a secrets manager instead.

Bash·.env file
# .env file (never commit to git!)
SENDSEVEN_API_TOKEN=s7_api_your_token_here

Rotate tokens regularly

Periodically create new tokens and revoke old ones, especially for production systems. This limits exposure if a token is compromised.

Use separate tokens per integration

Create different tokens for different integrations. If one token is compromised, you can revoke it without affecting other services.

Request minimum scopes

Only request the scopes your integration actually needs. Follow the principle of least privilege to reduce risk.

Revoke unused tokens

Delete tokens that are no longer in use. Check your token list regularly and remove any that are obsolete.

What you get

Scoped permissions

Limit each token to specific actions like reading contacts, sending messages, or managing webhooks. Follow the principle of least privilege.

Instant revocation

Revoke any token immediately from the API settings page. Revocation is instant — the token stops working right away for all new requests.

Unlimited tokens

Create as many tokens as you need, each with different scopes and names. Perfect for giving different integrations only the permissions they require.

Bearer authentication

Standard Bearer token authentication via the Authorization header. Works with any HTTP client in any programming language.

Need help?

Get personalized help from our team

Fine-grained

Scoped permissions

Instant

Token revocation

Bearer

Token auth

Frequently Asked Questions

What are API scopes?
API scopes define the permissions your token has. Instead of giving full access, you can limit tokens to specific actions like reading contacts, sending messages, managing webhooks, or accessing reports. This follows the principle of least privilege for security.
Can I create multiple tokens?
Yes. You can create unlimited API tokens, each with different scopes and names. This is useful for giving different third-party integrations or team members only the permissions they need.
Do API tokens expire?
Yes. New tokens expire after 90 days by default. When you create a token, you can choose 30, 90, 180 or 365 days, a custom date, or Never. You receive a reminder email 14 days and 1 day before a token expires, and once after it has expired.
How do I use the token in API calls?
Include your token as a Bearer token in the Authorization header. Example: Authorization: Bearer your_api_token_here. All requests are sent over HTTPS.
Can I revoke a token instantly?
Yes. Any token can be revoked instantly from the API settings page. Revocation is immediate — the token stops working right away for all new requests.
What are the available permission scopes?
SendSeven offers granular scopes including: messages:read/write, contacts:read/write, channels:read/write, reports:read, webhooks:read/write, integrations:read/write, and audit:read for compliance logging.
How are API requests rate limited?
Rate limits apply per workspace and are the same on every plan. Each limit counts requests in a rolling 60-second window. Every response returns the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers; if you exceed a limit, the API answers with 429 and a Retry-After header. The current values are in the API documentation at docs.sendseven.com.

Ready to get started?

Start with 100 test messages. Full access during the trial. No credit card required.

No credit card required
100 test messages included