NightmailDocs
Docs

Get sender score

get/v1/sender-score

The workspace sender score, the daily limit it sets and the enforcement step (Hosted). In good standing (a score of 75 or more, no warning) there is no daily limit: limit.unlimited is true, limit.daily null, and only the per-minute pace (limit.perMinute) applies. A new workspace's first 500 real recipients are its evaluation, at 500 a day until their delivery results are in (gradedBy says by when); for 24 clean hours after it, sending grows from 1,000 recipients an hour, doubling with each clean hour (limit.growth). Under 75 the limit is 500 (70–74), 200 (65–69) or 100, and a warning freezes it. The score (0–100) is the quality of what the workspace sends (complaints, the spam screen, bounces, list quality, authentication and engagement), decayed with a 30-day half-life and recounted hourly. Self-hosted and BYO get the score for display only. Dashboard sessions may receive a cached result until the workspace creates an email or records an email event (quantized to 10-second buckets during high-volume sending), or for up to 60 seconds, and compute at most 30 such Overview reads a minute: past that they get their last result (cache header stale) or 429 DASHBOARD_RATE_LIMITED. API keys, MCP and agent tokens always get fresh results. A change of standing or limit shows at once. Workspace-wide: keys restricted to domains get 403.

Needs Sent mail: read on the whole workspace.

Example

import { createClient } from '@nightmail/sdk/client';
import { getSenderScore } from '@nightmail/sdk';

const client = createClient({
  baseUrl: 'https://nightmail.dev',
  auth: scheme => scheme.scheme === 'bearer'
    ? process.env.NIGHTMAIL_API_KEY
    : undefined,
});

const result = await getSenderScore({
  client,
  throwOnError: true,
});

console.log(result.data);
curl --request GET \
  --url 'https://nightmail.dev/v1/sender-score' \
  --header "Authorization: Bearer $NIGHTMAIL_API_KEY"

Responses

200Success
SenderScore
staterequiredstring

warmup during the evaluation: until 500 real recipients were accepted and their delivery results are in (90% of them, or an hour after the 500th) (Hosted), or the first 500 emails (self-hosted).

emailsrequiredobject
emails.firstEmailsrequiredinteger

Real recipients accepted, counted up to 500.

emails.last30Daysrequiredinteger
neededrequiredinteger

Accepted recipients before the first score (500).

calibratedAtrequiredstring or null

When the 500th recipient was counted; the score starts once their delivery results are in, at most an hour later plus the ten-minute job run (gradedBy).

gradedByrequiredstring or null

Hosted, during the evaluation once the 500th recipient was counted: the latest the first grade comes (an hour after it, plus the ten-minute job run), sooner once 90% of them have a delivery result. Null otherwise.

scorerequirednumber or null

0–100, one decimal; null while warming up. The quality of the last 30 days of mail, recounted hourly: 75 and up has no daily limit.

graderequiredstring or null
targetrequirednumber

The score the evidence supports now; the score follows it on every run (the same as raw).

rawrequirednumber

Quality: the weighted factor result.

bandrequiredobject or null

The current grade band.

band.minrequirednumber
band.maxrequirednumber
nextrequiredobject or null

The next grade up and the score it starts at.

next.graderequiredstring
next.atrequirednumber
factorsrequiredobject[]
factors[].keyrequiredstring

complaints, content (the spam screen), bounces (to known recipients), hygiene (list quality: campaign first sends and their suppression hits; neutral without campaign mail), auth, engagement.

factors[].labelrequiredstring
factors[].weightrequiredinteger

Share of the score, out of 100, when every factor is measured.

factors[].valuerequirednumber or null

The measured rate or ratio, decayed with a 30-day half-life; null when neutral.

factors[].scorerequirednumber or null

0–100 for this factor; null when neutral.

factors[].pointsrequirednumber or null

weight × score ÷ 100; null when neutral.

factors[].sourcerequiredstring

Neutral factors are left out and the measured ones re-weighted.

factors[].basisrequiredstring
historyrequiredobject[]

The published daily score, oldest first, up to 14 days.

history[].daterequiredstring

UTC day, YYYY-MM-DD.

history[].scorerequirednumber
limitrequiredobject or null

Hosted only: the daily limit the score sets (none in good standing), the pace and what changes them.

limit.dailyrequiredinteger or null

Recipients per rolling 24 hours that admission enforces now. Null when there is no daily limit (unlimited): a workspace in good standing (score 75 and up, no warning) or an exempt one.

limit.unlimitedrequiredboolean

True when no daily limit applies (daily is null): only the per-minute pace bounds sending.

limit.sourcerequiredstring

calibrating: the evaluation (the first 500 real recipients); score: set by the score and the ladder, none in good standing; override: set by Nightmail; exempt: none.

limit.bandrequiredinteger

The daily limit the score earns, before a resume or strike reduction. Without one: what the per-minute pace allows in 24 hours (perMinute × 1,440).

limit.nextrequiredobject or null

The next band up and the score it starts at. Null without a daily limit, or when an operator set it.

limit.overriderequiredobject or null
limit.restorerequiredobject or null

After a resume: the limit is at most this many recipients a day until then (half the limit before the resume, unless an operator restored all of it).

limit.strikeCapUntilrequiredstring or null
limit.growthrequiredobject or null

For 24 clean hours after the evaluation, while it limits more than the per-minute pace: sending grows from 1,000 recipients an hour (shared by the account's workspaces, every stream) to twice the distinct recipients of the last completed hour whose results are in and clean. Null otherwise. Mail over it waits in the queue.

limit.perMinuterequiredinteger

Recipients a minute the workspace may send (pacing that protects the shared pool, not a daily limit): clamp(daily ÷ 20, 50, 500), or without a daily limit a quarter of the pool's SES rate, at least 500. Half of it per sending domain.

limit.marketingPerHourrequiredinteger

Marketing recipients an hour: max(25, daily ÷ 4); without a daily limit, what the per-minute pace allows (perMinute × 60).

limit.transactionalReserverequiredinteger

Recipients of the daily limit marketing may not use, kept for transactional mail: max(100, 10%). 0 without a daily limit and during the evaluation, whose recipients may all be marketing.

standingrequiredobject or null

Hosted only: the enforcement step and why.

standing.steprequiredstring

ok; notice (dashboard only); warn (limit frozen: no rises, and a workspace without one is limited to what SES accepted from it in the last 24 hours, at least 10,000; owners emailed); restrict (marketing held, transactional flows, limit frozen); pause (all sending stopped).

standing.reasonsrequiredobject[]
standing.sincerequiredstring
standing.pauseKindrequiredstring or null

bounce: only transactional bounces paused it, and an owner may resume it once in 30 days. full: complaints, the spam screen, abuse or an AWS tenant pause; an operator reviews it.

standing.marketingHeldrequiredboolean
standing.marketingReleaserequiredobject or null

An owner released a restrict: marketing is at this share of its allowance until then.

standing.strikesrequiredinteger

Pauses in the last 90 days. A second caps the limit at 50% for 7 days after the resume; a third needs an operator for any resume.

standing.selfServicerequiredobject

Whether an owner or admin can release this step from the dashboard (POST /v1/sender-score/release), and if not, why.

standing.versionrequiredinteger

Changes with every change of standing; account.standing.changed carries it.

standing.sequencerequiredinteger
standing.probationrequiredstring or null

Why Nightmail still checks this workspace as a new sender; null in good standing, which it reaches by itself. evaluation: its first 500 real recipients; growth: the growth pace after them; standing: a daily limit set by the score, a freeze or a strike, or a step from warn up. Until then a campaign over 500 recipients sends a list probe first, and mail is delivered as the copy the content screen read (style sheets inlined, @media and dark-mode rules left out) with the attachment allowlist, except from domains Nightmail placed on its trusted tier. The image-to-text rule applies in good standing too.

computedAtrequiredstring
400, 401, 403, 404, 409, 413, 422, 429, 500, 503Request failed; use error.code and requestId to diagnose.
ApiError
errorrequiredobject
error.coderequiredstring
error.messagerequiredstring
error.requestIdrequiredstring
error.fieldstring
error.retryablerequiredboolean
error.resetAtstring

Next capacity change for a Hosted rolling send limit.

error.detailsobject[]

Every problem found, when there is more than one part, such as rule diagnostics with rule, line, column, message and hint, or a measurement, such as CONTENT_TOO_LARGE_TO_SCREEN with screenedBytes and limitBytes (and index in a batch).

error.requiredobject

On a 403 permission refusal: what the request needs that this credential lacks. The Nightmail-Required-Permission header says the same.