Skip to content

Diagnose e-mail sending

GET
https://api.getsitecontrol.com/v1/sites/{site_id}/emails/diagnostics
curl --request GET \
--url https://api.getsitecontrol.com/v1/sites/1/emails/diagnostics \
--header 'Authorization: Bearer <token>'

Why the site’s e-mail does not go out, or goes out slowly: the first call for “my broadcast is stuck”, “nothing is sent”, “sending is paused” or “why can’t I start it”. Five checks in the order sending is gated - the account, sending being enabled, the email balance, the plan, delivery - each with a stable reason code, what to do (next_action), who can do it (who) and facts in values. Read who before promising anything: what support decides is never promised. Name a broadcast or an automation to learn what holds it and what to do after the fix (then); nothing resumes or turns on by itself.

The answer is the stored state and makes no change; the balance carries its updated_at. Recipients and credits a broadcast needs are get_broadcast_recipients, its sender address get_broadcast, domain verification list_email_domains. The meaning of every code and how to word it for the user: the guide emails.sending.

FieldDescription
site_id
required
Site Id
integer
FieldDescription
broadcast_id
Broadcast Id

A broadcast id from list_broadcasts

integer
>= 1

A broadcast id from list_broadcasts

automation_id
Automation Id

An automation id from list_automations

integer
>= 1

An automation id from list_automations

Successful Response

Media typeapplication/json
EmailSendingDiagnosis
object
FieldDescription
state
required

Whether the site can send: blocking when a check blocks, unknown when account, sending or balance could not be read, warning when a check warns or plan or delivery could not be read

string
Allowed values: ok warning blocking unknown
checks
required
Checks

Always the five checks, in the order sending is gated

Array<object>
EmailDiagnosticCheck
object
FieldDescription
state
required

Ok, warning, blocking or unknown

string
Allowed values: ok warning blocking unknown
reason

Why, a stable code; null when ok

string
Allowed values: account_suspended trial_ended plan_not_selected subscription_ended site_deactivated email_not_verified limited blocked_suspicious_activity blocked_poor_delivery sandbox other overdraft empty broadcasts_not_on_plan automations_not_on_plan high_complaints high_bounces contact_validation
next_action
required

What to do; none when ok

string
Allowed values: none contact_support top_up_balance upgrade_plan check_billing activate_site verify_email clean_contacts wait
who
required

Who can fix it; none when ok

string
Allowed values: user owner support none
check
required

What was checked

string
Allowed values: account sending balance plan delivery
values
required
Values

Facts of the check, {} when none. sending: has_sent, whether the site has ever sent. balance: status (enabled, warning, disabled), updated_at of the stored balance, and credits left, only with the emails.full right. delivery: bounce_rate, complaint_rate, unsubscribe_rate, fractions of all e-mails the site has sent

object
broadcast
Broadcast

The requested broadcast: what holds it; null when none asked

object
FieldDescription
state
required

Ok, warning, blocking or unknown

string
Allowed values: ok warning blocking unknown
reason

Why, a stable code; null when ok

string
Allowed values: account_suspended trial_ended plan_not_selected subscription_ended site_deactivated email_not_verified limited blocked_suspicious_activity blocked_poor_delivery sandbox other overdraft empty broadcasts_not_on_plan automations_not_on_plan high_complaints high_bounces contact_validation
next_action
required

What to do; none when ok

string
Allowed values: none contact_support top_up_balance upgrade_plan check_billing activate_site verify_email clean_contacts wait
who
required

Who can fix it; none when ok

string
Allowed values: user owner support none
id
required
Id
integer
status
Status

As get_broadcast shows it

string
nullable
status_reason
Status Reason

As get_broadcast shows it

string
nullable
then
required

What to do once the cause is fixed

string
Allowed values: resume_broadcast duplicate_broadcast turn_on_automation none
values
required
Values

stops_at: when a paused broadcast is stopped for good. ended_at: when an ended one ended. history_since: the date status reasons are recorded from, for an older broadcast

object
automation
Automation

The requested automation: what holds it; null when none asked

object
FieldDescription
state
required

Ok, warning, blocking or unknown

string
Allowed values: ok warning blocking unknown
reason

Why, a stable code; null when ok

string
Allowed values: account_suspended trial_ended plan_not_selected subscription_ended site_deactivated email_not_verified limited blocked_suspicious_activity blocked_poor_delivery sandbox other overdraft empty broadcasts_not_on_plan automations_not_on_plan high_complaints high_bounces contact_validation
next_action
required

What to do; none when ok

string
Allowed values: none contact_support top_up_balance upgrade_plan check_billing activate_site verify_email clean_contacts wait
who
required

Who can fix it; none when ok

string
Allowed values: user owner support none
id
required
Id
integer
is_active
required
Is Active
boolean
sends_email
required
Sends Email

The automation has an e-mail step; without one only the account and the plan apply

boolean
off_reason
Off Reason

Why it was turned off, a reason of list_automation_history; null when it is on or a person turned it off; unknown when it is off and no record says why

string
nullable
then
required

What to do once the cause is fixed

string
Allowed values: resume_broadcast duplicate_broadcast turn_on_automation none
values
required
Values

history_since: the date turn-offs are recorded from, with off_reason: unknown

object

Example

{
"state": "ok",
"checks": [
{
"state": "ok",
"reason": "account_suspended",
"next_action": "none",
"who": "user",
"check": "account"
}
],
"broadcast": {
"state": "ok",
"reason": "account_suspended",
"next_action": "none",
"who": "user",
"then": "resume_broadcast"
},
"automation": {
"state": "ok",
"reason": "account_suspended",
"next_action": "none",
"who": "user",
"then": "resume_broadcast"
}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Unsupported GSC-Version

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Missing or invalid API key or access token

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

WWW-Authenticate
string

Authentication scheme: Bearer

Access denied

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Media typeapplication/problem+json

site_not_found: no such site in your account; broadcast_not_found, automation_not_found: the site has no such broadcast or automation

Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

validation_failed: both broadcast_id and automation_id are given, or an id is invalid

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Rate limited

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Retry-After
integer

Seconds until the bucket refills

Temporarily unavailable; retry later

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds