curl --request POST \
--url https://app.wazobiamail.com/api/v1/sending/api-keys \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Billing worker",
"scope": "general",
"domainId": "<string>",
"expiresAt": "2027-01-31T23:59:59"
}
'import requests
url = "https://app.wazobiamail.com/api/v1/sending/api-keys"
payload = {
"name": "Billing worker",
"scope": "general",
"domainId": "<string>",
"expiresAt": "2027-01-31T23:59:59"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Billing worker',
scope: 'general',
domainId: '<string>',
expiresAt: '2027-01-31T23:59:59'
})
};
fetch('https://app.wazobiamail.com/api/v1/sending/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.wazobiamail.com/api/v1/sending/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Billing worker',
'scope' => 'general',
'domainId' => '<string>',
'expiresAt' => '2027-01-31T23:59:59'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.wazobiamail.com/api/v1/sending/api-keys"
payload := strings.NewReader("{\n \"name\": \"Billing worker\",\n \"scope\": \"general\",\n \"domainId\": \"<string>\",\n \"expiresAt\": \"2027-01-31T23:59:59\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.wazobiamail.com/api/v1/sending/api-keys")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Billing worker\",\n \"scope\": \"general\",\n \"domainId\": \"<string>\",\n \"expiresAt\": \"2027-01-31T23:59:59\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.wazobiamail.com/api/v1/sending/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Billing worker\",\n \"scope\": \"general\",\n \"domainId\": \"<string>\",\n \"expiresAt\": \"2027-01-31T23:59:59\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Done",
"data": "<unknown>"
}{
"success": false,
"statusCode": 422,
"message": "Validation failed",
"errors": {
"content.from": "This account is not authorized to send from this email address. Connect its Gmail account, verify your sending domain, or omit content.from to use the platform sender"
}
}Create a scoped sending key
Creates a send-only key. scope is general (default) or domain. A domain key requires domainId of a verified sending domain. Domain-specific keys require an active or trialing Business or Enterprise subscription for creation, regeneration and authentication. Purchased credits alone do not unlock them. Use the secret as x-api-key; it only authorizes message sending and attachment upload, not account, domain, mailbox, tracking or key management. A matching content.from selects an active hosted mailbox or connected Gmail mailbox. Otherwise the first eligible mailbox is selected; domain keys restrict selection to that exact domain. If no mailbox is available in scope, the platform sender is used. Explicit display names are retained. Reply-To defaults to the effective sender unless content.replyTo is supplied. The secret is returned once.
curl --request POST \
--url https://app.wazobiamail.com/api/v1/sending/api-keys \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Billing worker",
"scope": "general",
"domainId": "<string>",
"expiresAt": "2027-01-31T23:59:59"
}
'import requests
url = "https://app.wazobiamail.com/api/v1/sending/api-keys"
payload = {
"name": "Billing worker",
"scope": "general",
"domainId": "<string>",
"expiresAt": "2027-01-31T23:59:59"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Billing worker',
scope: 'general',
domainId: '<string>',
expiresAt: '2027-01-31T23:59:59'
})
};
fetch('https://app.wazobiamail.com/api/v1/sending/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.wazobiamail.com/api/v1/sending/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Billing worker',
'scope' => 'general',
'domainId' => '<string>',
'expiresAt' => '2027-01-31T23:59:59'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.wazobiamail.com/api/v1/sending/api-keys"
payload := strings.NewReader("{\n \"name\": \"Billing worker\",\n \"scope\": \"general\",\n \"domainId\": \"<string>\",\n \"expiresAt\": \"2027-01-31T23:59:59\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.wazobiamail.com/api/v1/sending/api-keys")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Billing worker\",\n \"scope\": \"general\",\n \"domainId\": \"<string>\",\n \"expiresAt\": \"2027-01-31T23:59:59\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.wazobiamail.com/api/v1/sending/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Billing worker\",\n \"scope\": \"general\",\n \"domainId\": \"<string>\",\n \"expiresAt\": \"2027-01-31T23:59:59\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Done",
"data": "<unknown>"
}{
"success": false,
"statusCode": 422,
"message": "Validation failed",
"errors": {
"content.from": "This account is not authorized to send from this email address. Connect its Gmail account, verify your sending domain, or omit content.from to use the platform sender"
}
}Authorizations
Dashboard API key created at https://app.wazobiamail.com/dashboard/smtp-api. Send operations also accept a narrower sending key created through POST /sending/api-keys; every other operation needs the dashboard key.
Body
2 - 120"Billing worker"
general selects from account mailboxes; domain restricts selection to one verified domain and requires an active or trialing Business or Enterprise subscription.
general, domain Required when scope is domain. Use the id of a verified sending domain.
Optional expiry timestamp. Expired keys return 401.
"2027-01-31T23:59:59"
