Get Rabbitflare SMTP on a site
/v1/sites/{siteId}/smtp Returns Rabbitflare SMTP on the site: whether it's on (status, enabled) or stopped (hold), whether the account may turn it on (eligible), the sender recipients see (from), the limits and what the site sent against them (usage), its notice and reply addresses, and its latest emails with what happened to each (recentEmails). The emails' recipients and subjects and the team's sign-in addresses are people's details, so every call is written to the token's request log.
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
sites:read - View sites. See sites and their domains, CDN, firewall, malware protection, backups, staging, resources, SMTP and Media Offload. SMTP includes who each site's recent emails went to, their subjects, and the team's sign-in addresses.
Path parameters
| Field | Type and description |
|---|---|
siteId Required | string The site's id. |
Example request
curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/smtp" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/smtp", {
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
const data = await rf.sites.smtp.get({ siteId: "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d" });
console.log(data); <?php
$ch = curl_init('https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/smtp');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
print_r(json_decode($body, true)['data']); import os
import requests
response = requests.get(
"https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/smtp",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
timeout=120,
)
response.raise_for_status()
print(response.json()["data"]) Response
200 OK Returns the SiteSmtp object in data.
The SiteSmtp object's fields 80 fields
| Field | Type and description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status | string
Known values: | ||||||||||||||
enabled | boolean Whether it's turned on for the site, whatever stop | ||||||||||||||
blockedReason | string or null Why the site can't have Rabbitflare SMTP right now: a staging copy, a site still installing, or a server that's stopped or suspended. Null when it can. | ||||||||||||||
eligible | object Whether the account may use it for this site: a paid, running server (not a free trial) and a confirmed account email address. | ||||||||||||||
ok | boolean Whether the account may turn it on for this site. | ||||||||||||||
code | string or null Why not, as a code ( Known values: | ||||||||||||||
message | string or null Why not, in a sentence. Null when it may. | ||||||||||||||
lastError | string or null Why setting it up on the site's server, or removing it, didn't finish (with | ||||||||||||||
hold | object or null A stop on the site's emails: an automatic safety check, or Rabbitflare's team. Null when there's none. | ||||||||||||||
kind | string
Known values: | ||||||||||||||
reason | string Why, in a sentence. | ||||||||||||||
note | string What to do about it, in a sentence. | ||||||||||||||
heldAt | string or null An ISO 8601 time, in UTC When it was stopped. | ||||||||||||||
canResumeAt | string or null An ISO 8601 time, in UTC A first pause: when it may be turned on again ( | ||||||||||||||
canResume | boolean Whether it may be turned on again now. | ||||||||||||||
accountOff | object or null Set when the account's email is switched off for good (only support can lift it). Null otherwise. | ||||||||||||||
reason | string Why, in a sentence. | ||||||||||||||
offAt | string or null An ISO 8601 time, in UTC When it was switched off. | ||||||||||||||
wpMailReplaced | boolean Another plugin has replaced WordPress's wp_mail(), so the site's emails don't go through Rabbitflare SMTP. | ||||||||||||||
pluginCheck | object The site's server checks the plugin file every few minutes: nothing is sent while it's changed or unchecked. | ||||||||||||||
ok | boolean Whether the Rabbitflare SMTP plugin file on the site is the one Rabbitflare put there. | ||||||||||||||
checkedAt | string or null An ISO 8601 time, in UTC When the site's server last checked it. Null before the first check. | ||||||||||||||
firstOnAt | string or null An ISO 8601 time, in UTC When it was first turned on for the site. Null if never. | ||||||||||||||
newSiteEndsAt | string or null An ISO 8601 time, in UTC While the site is new to Rabbitflare SMTP (its first 14 days, with lower daily limits): when that ends. Null otherwise. | ||||||||||||||
from | string The sender the recipients see: the site's domain as the name, and the site's own sending address. | ||||||||||||||
replyTo | string or null The confirmed reply address the site's emails carry. Null when it has none. | ||||||||||||||
limits | object The limits in force. Times are rolling: 24 hours, not a calendar day. | ||||||||||||||
perSite10Min | integer Emails the site may send in 10 minutes. | ||||||||||||||
perSiteDay | integer Emails the site may send in 24 hours. | ||||||||||||||
perAccountDay | integer Emails all the account's sites may send in 24 hours. | ||||||||||||||
newRecipientsPerDay | integer Addresses the site has never emailed before that it may email in 24 hours. | ||||||||||||||
newSitePerDay | integer Emails a site may send in 24 hours while it's new to Rabbitflare SMTP (its first 14 days). | ||||||||||||||
newRecipientsPerDayFirst14 | integer New addresses a site may email in 24 hours in its first 14 days. | ||||||||||||||
perRecipientHour | integer Emails one address may be sent from the site in an hour. | ||||||||||||||
perRecipientDay | integer Emails one address may be sent from the site in 24 hours. | ||||||||||||||
noticePerSiteDay | integer Admin notices to confirmed addresses in 24 hours (their own allowance). | ||||||||||||||
noticeAddressesPerSite | integer Notice addresses a site may add. | ||||||||||||||
usage | object or null What the site sent, against its limits. Null if it was never turned on, and in a change's answer to a token without | ||||||||||||||
tenMinutes | object The site's emails in the last 10 minutes. Show its 2 fields
| ||||||||||||||
today | object The site's emails in the last 24 hours. Show its 2 fields
| ||||||||||||||
account | object or null All the account's sites' emails in the last 24 hours. Null for a token limited to some servers: it counts the sites on every server. Show its 2 fields
| ||||||||||||||
newRecipients | object New addresses the site emailed in the last 24 hours. Show its 2 fields
| ||||||||||||||
notices | object Admin notices to confirmed addresses in the last 24 hours. Show its 2 fields
| ||||||||||||||
refusedToday | integer Emails refused in the last 24 hours. | ||||||||||||||
paidToday | integer Emails paid from the account's email credit in the last 24 hours. | ||||||||||||||
days | array of objects The last 30 days, oldest first. Show its 6 fields
| ||||||||||||||
addresses | array of objects The account's own addresses first, then the ones added to the site. A token limited to some servers sees only the team members who can reach the site's server; a change's answer to a token without | ||||||||||||||
id | string The address's id. The account's own addresses have ids starting | ||||||||||||||
kind | string
Known values: | ||||||||||||||
address | string The email address. | ||||||||||||||
confirmed | boolean Whether its owner confirmed it from the link in the confirmation email. Only confirmed addresses are used. | ||||||||||||||
confirmationSentAt | string or null An ISO 8601 time, in UTC When the last confirmation email was sent to it. Null for the account's own addresses. | ||||||||||||||
source | string
Known values: | ||||||||||||||
suggestedNoticeAddresses | array of strings Addresses the site tried to send admin notices to in the last 30 days that aren't confirmed: add them to let notices through. Empty in a change's answer to a token without | ||||||||||||||
recentEmails | array of objects The site's latest emails, newest first. Empty in a change's answer to a token without | ||||||||||||||
id | string The email's id. | ||||||||||||||
sentAt | string An ISO 8601 time, in UTC When the site sent it. | ||||||||||||||
type | string or null What kind of email it is: Known values: | ||||||||||||||
to | string or null Who it was for (kept 30 days). Null when it was refused before it could be read. | ||||||||||||||
subject | string or null Its subject. Null when it was refused before it could be read. | ||||||||||||||
status | string What happened to it: Known values: | ||||||||||||||
code | string or null Why it wasn't sent, as a code ( Known values: | ||||||||||||||
reason | string or null Why it wasn't sent, in a sentence. Null when it was. | ||||||||||||||
paid | boolean Paid from the account's email credit: it was beyond the site's included emails. |
Example response
{
"data": {
"status": "on",
"enabled": true,
"blockedReason": null,
"eligible": {
"ok": true,
"code": null,
"message": null
},
"lastError": null,
"hold": null,
"accountOff": null,
"wpMailReplaced": false,
"pluginCheck": {
"ok": true,
"checkedAt": "2026-11-19T10:01:00.000Z"
},
"firstOnAt": "2026-10-28T14:20:11.000Z",
"newSiteEndsAt": null,
"from": "\"shop.example.com\" <[email protected]>",
"replyTo": "[email protected]",
"limits": {
"perSite10Min": 5,
"perSiteDay": 50,
"perAccountDay": 150,
"newRecipientsPerDay": 15,
"newSitePerDay": 10,
"newRecipientsPerDayFirst14": 5,
"perRecipientHour": 3,
"perRecipientDay": 10,
"noticePerSiteDay": 10,
"noticeAddressesPerSite": 5
},
"usage": {
"tenMinutes": {
"used": 1,
"limit": 5
},
"today": {
"used": 12,
"limit": 50
},
"account": {
"used": 19,
"limit": 150
},
"newRecipients": {
"used": 4,
"limit": 15
},
"notices": {
"used": 2,
"limit": 10
},
"refusedToday": 0,
"paidToday": 0,
"days": [
{
"date": "2026-11-18",
"sent": 14,
"delivered": 14,
"bounced": 0,
"complained": 0,
"refused": 0
},
{
"date": "2026-11-19",
"sent": 12,
"delivered": 11,
"bounced": 0,
"complained": 0,
"refused": 0
}
]
},
"addresses": [
{
"id": "account:0b9f2c1e-6d3a-4f7e-9a51-2c8e4b7d1f60",
"kind": "notice",
"address": "[email protected]",
"confirmed": true,
"confirmationSentAt": null,
"source": "account"
},
{
"id": "6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d",
"kind": "reply",
"address": "[email protected]",
"confirmed": true,
"confirmationSentAt": "2026-10-28T14:25:40.000Z",
"source": "added"
}
],
"suggestedNoticeAddresses": [],
"recentEmails": [
{
"id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"sentAt": "2026-11-19T09:58:03.000Z",
"type": "order",
"to": "[email protected]",
"subject": "Your Shop order has been received!",
"status": "delivered",
"code": null,
"reason": null,
"paid": false
}
]
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
403 feature_ | This product isn't open to the account. Contact support if you'd like it opened. |
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |
429 rate_ | Too many requests. Wait for Retry-After seconds, then go on more slowly. |