Send a test email
Sends one test email from the site through a verified sending domain, the default unless domain names another. The answer is a command: when its status is queued or running, follow it with the command endpoint. Beside the limit on changes, a site may send 20 test emails a day (the day in UTC), counted with the tests sent from the Control Panel and by AI assistants: test.remaining_today of the email settings says how many are left, and a test past the last answers 429 limit, which no wait within the day lifts. One test is sent at a time on a site.
Path parameters
The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.
Body
The sending domain to send through, by its name or its id. Left out, the default.
The address to send the test to. At most 254 characters, without quotes or angle brackets. Format: email.
Returns
202 The test was started. command.result holds its outcome once it has finished.
Fields of the 202 answer
One test send.
Fields
Format: date-time.
At least 1.
What was asked for, to and domain.
At least 1.
Format: date-time.
Who asked for the test. Null when that person's account has since been deleted.
The outcome, once the send has finished.
A site by its id and domain.
Fields
Format: date-time.
queued and running: the send has not ended, read again. Every other value is final: succeeded, failed, timed_out (the site did not answer in time) and lost (the connection to the site ended before the send reported back). Only succeeded means the email was handed over.
queuedrunningsucceededfailedtimed_outlostIf it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | company_unavailable | Your company is unavailable. |
403 | scope_required | Use a token with the scope named in scope. |
403 | two_factor_required | Turn on two-factor on your account, then send again. |
404 | feature_off | This feature is not on for your organisation yet. |
404 | tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
409 | busy | Another operation is running on the site. Wait for it to finish. |
409 | command_running | Another action or command is still running on the site. Wait for it to finish, then try again. |
409 | state | What the request acts on is not in a state that allows this. Read the message. |
422 | invalid | Fix the field named in field; errors says why. |
429 | limit | A limit on how many of these there can be, or how often this can be done, has been reached. Read the message: remove or close one, or try again later. |
429 | rate_limited | Wait for the seconds in Retry-After. |
503 | none | Try again shortly. |
503 | switched_off | Corefinity has switched this action off for the moment. Try again later. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/email/test \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"to": "[email protected]"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/corestack/sites/1042/email/test', [
'to' => '[email protected]',
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/email/test', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
to: '[email protected]',
}),
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.post(
"https://manage.corefinity.com/api/corestack/sites/1042/email/test",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"to": "[email protected]",
},
)
data = res.json() if res.content else None{
"command": {
"blocked_until_verified": false,
"duration_ms": 0,
"error": null,
"exit_code": 0,
"finished_at": "2026-11-03T09:16:40Z",
"id": 6187,
"input": {
"domain": "mg.harbourandfinch.example.com",
"to": "[email protected]"
},
"kind": "email_test",
"label": "Send a test email",
"operation_id": null,
"output_excerpt": "sent\n",
"queued_at": "2026-11-03T09:16:40Z",
"requested_by": {
"id": 2012,
"name": "Daniel Reyes"
},
"result": {
"message": "Sent. Check the inbox (and spam) of [email protected].",
"sent": true
},
"site": {
"domain": "harbourandfinch.example.com",
"id": 1042
},
"started_at": "2026-11-03T09:16:40Z",
"status": "succeeded",
"status_label": "Done"
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "busy",
"message": "Another change to this site is in progress. Wait for it to finish.",
"reason": "busy"
}{
"code": "invalid",
"errors": {
"to": [
"Enter the address to send the test email to"
]
},
"field": "to",
"message": "Enter the address to send the test email to",
"reason": "invalid"
}{
"code": "limit",
"message": "Twenty test emails a day per site. Try again tomorrow.",
"reason": "limit"
}{
"message": "The cluster could not be reached"
}Try it is off for this endpointIt sends email to real people. Copy the request and run it yourself when you are sure.