Sending API Key
Sending API keys are domain-scoped and are associated with a specific sending domain.
- Used for transactional email.
- Associated with a sending domain.
- Must remain server-side.
Authorization: Bearer YOUR_SENDING_API_KEY
Authenticate Sendzovo REST API requests with Bearer tokens. Domain-scoped Sending API keys vs account-level Verification API keys, with code examples.
https://api.sendzovo.com/v1
Sendzovo uses Bearer tokens for REST API authentication. Sending and verification operations use separate API credential types.
Sending API keys are domain-scoped and are associated with a specific sending domain.
Authorization: Bearer YOUR_SENDING_API_KEY
Verification API keys are account-scoped and are used specifically for Email Verification.
Authorization: Bearer YOUR_VERIFICATION_API_KEY
| Sending API Key | Verification API Key | |
|---|---|---|
| Scope | Sending domain | Account |
| Send email | Yes | No |
| Verify email | No | Yes |
| Domain association | Required | Not required |
curl "https://api.sendzovo.com/v1/messages/MESSAGE_ID" \
-H "Authorization: Bearer YOUR_SENDING_API_KEY"
<?php
require 'vendor/autoload.php';
use Sendzovo\Client;
$sendzovo = Client::withSendingKey(
$_ENV['SENDZOVO_SENDING_API_KEY']
);
$message = $sendzovo->messages()->get(
'MESSAGE_ID'
);
print_r($message);
const response = await fetch(
"https://api.sendzovo.com/v1/messages/MESSAGE_ID",
{
headers: {
"Authorization":
"Bearer YOUR_SENDING_API_KEY"
}
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
"https://api.sendzovo.com/v1/messages/MESSAGE_ID",
headers={
"Authorization":
"Bearer YOUR_SENDING_API_KEY"
},
)
print(response.json())
using System.Net.Http.Headers;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Bearer",
"YOUR_SENDING_API_KEY"
);
var response = await client.GetAsync(
"https://api.sendzovo.com/v1/messages/MESSAGE_ID"
);
var result =
await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
Store API credentials in environment variables or another secure secret-management system instead of hard-coding them into application source code.
SENDZOVO_SENDING_API_KEY=your_sending_api_key
SENDZOVO_VERIFICATION_API_KEY=your_verification_api_key
<?php
use Sendzovo\Client;
$sendzovo = Client::withSendingKey(
$_ENV['SENDZOVO_SENDING_API_KEY']
);
For email verification:
<?php
use Sendzovo\Client;
$sendzovo = Client::withVerificationKey(
$_ENV['SENDZOVO_VERIFICATION_API_KEY']
);
An application that sends email and performs email verification can initialize the SDK with both credentials.
<?php
use Sendzovo\Client;
$sendzovo = new Client(
sendingApiKey: $_ENV['SENDZOVO_SENDING_API_KEY'],
verificationApiKey: $_ENV['SENDZOVO_VERIFICATION_API_KEY'],
);
Create a free Sendzovo account, verify your domain and send your first email in minutes.