Appearance
staff.mailOutbox
2 methods on staff.mailOutbox. Each returns the answer's data and throws NoviqaError on a failed answer.
list
GET
/admin/v1/mail-outboxList the e-mail outbox
Queued and sent e-mails to accounts whose group is in the caller's group scope, newest first. state filters to queued, sending, sent or failed (empty = all). A failed e-mail is retried automatically, with growing waits, up to 8 attempts; last_error holds the latest failure and next_try_at the next attempt. page is 1-based; limit defaults to 50, values outside 1-200 fall back to 50.
More details
Rights: the staff member needs every one of: config.mail.
Parameters
statestring · querypageinteger · querylimitinteger · queryReturns
Promise<OutboxPage>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.mailOutbox.list({
state: "string",
page: 1,
limit: 1
})bash
curl -X GET "$NOVIQA_API_URL/admin/v1/mail-outbox?state=string&page=1&limit=1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"items": [
{
"attempts": 1,
"body": "string",
"created_at": "2026-09-25T10:15:00Z",
"html": true,
"id": 1,
"last_error": "string",
"login": 1001,
"mail_server_id": 1,
"next_try_at": "2026-09-25T10:15:00Z",
"recipient": "string",
"sent_at": "2026-09-25T10:15:00Z",
"state": "string"
}
],
"page": 1,
"total": 1
},
"request_id": "5b7f2c1e"
}ts
staff.mailOutbox.list(query?: { state?, page?, limit? }, options?: RequestOptions): Promise<mail.OutboxPage>retry
POST
/admin/v1/mail-outbox/{id}/retryRetry an e-mail now
Makes a queued or failed e-mail due at once and wakes the sender; it does not wait for the result (watch the outbox). Only e-mails of accounts in the caller's scope; others answer not_found. Other states are refused. Writes a journal line.
More details
Rights: the staff member needs every one of: config.mail.
Parameters
idinteger · pathrequiredNumeric id.
Returns
Promise<null>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.mailOutbox.retry(1)bash
curl -X POST "$NOVIQA_API_URL/admin/v1/mail-outbox/1/retry" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": null,
"request_id": "5b7f2c1e"
}ts
staff.mailOutbox.retry(id: number, options?: RequestOptions): Promise<null>