Skip to content

Authentication

SendAPI authenticates your requests using API keys. If you do not include your key, or use an invalid or revoked key, SendAPI will return an HTTP 401 Unauthorized response.

All API requests MUST be made over HTTPS. Calls made over plain HTTP will fail.

Using Your API Key

You must authenticate to the SendAPI platform by providing your secret API key in the Authorization header. You can generate and manage your API keys from your SendAPI Dashboard.

Bearer Token Format

Provide your API key as a Bearer token:

http
Authorization: Bearer sk_live_YOUR_API_KEY

Example Context

bash
curl https://sendapi.co/v1/whatsapp/send \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "message": "Hello world!"
  }'
javascript
import { SendAPI } from '@sendapi/node';

const client = new SendAPI('sk_live_YOUR_API_KEY');

// The client automatically attaches the authorization header
await client.whatsapp.send({
  to: '+1234567890',
  message: 'Hello world!'
});
python
from sendapi import SendAPI

client = SendAPI('sk_live_YOUR_API_KEY')

# The client automatically attaches the authorization header
client.whatsapp.send(
  to="+1234567890",
  message="Hello world!"
)

Key Types

All API keys currently start with sk_live_. These keys execute real production traffic and incur charges against your account balance (or consume your free trial quota). Keep your API keys perfectly secure.

Keep Your Keys Secret

Never commit your live API keys to GitHub, embed them in client-side code (like React, Vue, or mobile apps), or publish them in public forums. If a key is compromised, immediately revoke it from the dashboard.

Released under the MIT License.