Skip to content

Send a test email

POST
/billing/admin/email-test
curl --request POST \
--url https://api.sloose.com/billing/admin/email-test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "to": "example" }'

Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. Sends one message from hello@sloose.com through the Worker’s Email Service binding, to prove a deployment can send. Answers what the sender answered; a missing binding is sent: false, not an error.

Media typeapplication/json
object
to
required

The address to send to.

string
key
additional properties
Examplegenerated
{
"to": "example"
}

Whether the message left, and why not if it did not.

Media typeapplication/json
Any of:
object
sent
required
boolean
messageId
required
string
Example
{
"sent": true
}

to is missing or is not an email address.

Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{
"error": "example"
}

A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}