Skip to main content

Endpoints

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Obtain OAuth token

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/oauth', headers = headers)

print(r.json())

POST /oauth

Body parameter

{
"type": "code",
"client_id": "webadmin",
"redirect_uri": "stalwart://auth",
"nonce": "ttsaXca3qx"
}

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalsenone
» typebodystringfalsenone
» client_idbodystringfalsenone
» redirect_uribodystringfalsenone
» noncebodystringfalsenone

Example responses

200 Response

{
"data": {
"code": "4YmRFLu9Df1t4JO7Iffnuney4B8tVLAxjimdRxEg",
"permissions": [
"webadmin-update",
"spam-filter-update",
"dkim-signature-get",
"dkim-signature-create",
"undelete",
"fts-reindex",
"purge-account",
"purge-in-memory-store",
"purge-data-store",
"purge-blob-store"
],
"version": "0.11.0",
"isEnterprise": true
}
}

401 Response

{
"type": "about:blank",
"status": 401,
"title": "Unauthorized",
"detail": "You have to authenticate first."
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline
401UnauthorizedUnauthorizedInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» codestringfalsenonenone
»» permissions[string]falsenonenone
»» versionstringfalsenonenone
»» isEnterprisebooleanfalsenonenone

Status Code 401

NameTypeRequiredRestrictionsDescription
» typestringfalsenonenone
» statusnumberfalsenonenone
» titlestringfalsenonenone
» detailstringfalsenonenone

Fetch Telemetry Metrics

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/telemetry/metrics', headers = headers)

print(r.json())

GET /telemetry/metrics

Parameters

NameInTypeRequiredDescription
afterquerystringfalsenone

Example responses

200 Response

{
"error": "other",
"details": "No metrics store has been defined",
"reason": "You need to configure a metrics store in order to use this feature."
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» errorstringfalsenonenone
» detailsstringfalsenonenone
» reasonstringfalsenonenone

Obtain Metrics Telemetry token

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/telemetry/live/metrics-token', headers = headers)

print(r.json())

GET /telemetry/live/metrics-token

Example responses

200 Response

{
"data": "2GO4RahIkSAms6S00R9BRsroo97ZdYTz4QVxFCOwGrGkr7zguP0AVyTMA/iha3Vz/////w8DhZi1+ALBmLX4AndlYg=="
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» datastringfalsenonenone

Live Metrics

Code samples

import requests

r = requests.get('https://mail.example.org/api/telemetry/metrics/live')

print(r.json())

GET /telemetry/metrics/live

Parameters

NameInTypeRequiredDescription
metricsquerystringfalsenone
intervalquerynumberfalsenone
tokenquerystringfalsenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKOKNone

Response Schema

List Principals

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/principal', headers = headers)

print(r.json())

GET /principal

Parameters

NameInTypeRequiredDescription
pagequerynumberfalsenone
limitquerynumberfalsenone
typesquerystringfalsenone

Example responses

200 Response

{
"data": {
"items": [],
"total": 0
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» items[any]falsenonenone
»» totalnumberfalsenonenone

Create Principal

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/principal', headers = headers)

print(r.json())

POST /principal

Body parameter

{
"type": "domain",
"quota": 0,
"name": "example.org",
"description": "Example domain",
"secrets": [],
"emails": [],
"urls": [],
"memberOf": [],
"roles": [],
"lists": [],
"members": [],
"enabledPermissions": [],
"disabledPermissions": [],
"externalMembers": []
}

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalsenone
» typebodystringfalsenone
» quotabodynumberfalsenone
» namebodystringfalsenone
» descriptionbodystringfalsenone
» secretsbody[any]falsenone
» emailsbody[any]falsenone
» urlsbody[any]falsenone
» memberOfbody[any]falsenone
» rolesbody[any]falsenone
» listsbody[any]falsenone
» membersbody[any]falsenone
» enabledPermissionsbody[any]falsenone
» disabledPermissionsbody[any]falsenone
» externalMembersbody[any]falsenone

Example responses

200 Response

{
"data": 50
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» datanumberfalsenonenone

Create DKIM Signature

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/dkim', headers = headers)

print(r.json())

POST /dkim

Body parameter

{
"id": null,
"algorithm": "Ed25519",
"domain": "example.org",
"selector": null
}

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalsenone
» idbodyobject¦nullfalsenone
» algorithmbodystringfalsenone
» domainbodystringfalsenone
» selectorbodyobject¦nullfalsenone

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Fetch Principal

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/principal/{principal_id}', headers = headers)

print(r.json())

GET /principal/{principal_id}

Parameters

NameInTypeRequiredDescription
principal_idpathstringtruenone

Example responses

200 Response

{
"data": {
"id": 90,
"type": "individual",
"secrets": "$6$ONjGT6nQtmPNaxw0$NNF5DXtPfOay2mfVnPJ0uQ77C.L3LNxXO/QMyphP/DzpODqbDBBGd4/gCnckYPQj3st6pqwY8/KeBsCJ.oe1Y1",
"name": "jane",
"quota": 0,
"description": "Jane Doe",
"emails": "[email protected]",
"roles": [
"user"
],
"lists": [
"all"
]
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» idnumberfalsenonenone
»» typestringfalsenonenone
»» secretsstringfalsenonenone
»» namestringfalsenonenone
»» quotanumberfalsenonenone
»» descriptionstringfalsenonenone
»» emailsstringfalsenonenone
»» roles[string]falsenonenone
»» lists[string]falsenonenone

Update Principal

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.patch('https://mail.example.org/api/principal/{principal_id}', headers = headers)

print(r.json())

PATCH /principal/{principal_id}

Body parameter

[
{
"action": "set",
"field": "name",
"value": "jane.doe"
},
{
"action": "set",
"field": "description",
"value": "Jane Mary Doe"
},
{
"action": "addItem",
"field": "emails",
"value": "[email protected]"
},
{
"action": "removeItem",
"field": "emails",
"value": "[email protected]"
}
]

Parameters

NameInTypeRequiredDescription
principal_idpathstringtruenone
bodybodyarray[object]falsenone

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Delete Principal

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.delete('https://mail.example.org/api/principal/{principal_id}', headers = headers)

print(r.json())

DELETE /principal/{principal_id}

Parameters

NameInTypeRequiredDescription
principal_idpathstringtruenone

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

List Queued Messages

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/queue/messages', headers = headers)

print(r.json())

GET /queue/messages

Parameters

NameInTypeRequiredDescription
pagequerynumberfalsenone
max-totalquerynumberfalsenone
limitquerynumberfalsenone
valuesquerynumberfalsenone

Example responses

200 Response

{
"data": {
"items": [],
"total": 0,
"status": true
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» items[any]falsenonenone
»» totalnumberfalsenonenone
»» statusbooleanfalsenonenone

Reschedule Queued Messages

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.patch('https://mail.example.org/api/queue/messages', headers = headers)

print(r.json())

PATCH /queue/messages

Parameters

NameInTypeRequiredDescription
filterquerystringfalsenone

Example responses

200 Response

{
"data": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» databooleanfalsenonenone

Delete Queued Messages

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.delete('https://mail.example.org/api/queue/messages', headers = headers)

print(r.json())

DELETE /queue/messages

Parameters

NameInTypeRequiredDescription
textquerystringfalsenone

Example responses

200 Response

{
"data": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» databooleanfalsenonenone

List Queued Reports

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/queue/reports', headers = headers)

print(r.json())

GET /queue/reports

Parameters

NameInTypeRequiredDescription
max-totalquerynumberfalsenone
limitquerynumberfalsenone
pagequerynumberfalsenone

Example responses

200 Response

{
"data": {
"items": [],
"total": 0
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» items[any]falsenonenone
»» totalnumberfalsenonenone

List Incoming DMARC Reports

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/reports/dmarc', headers = headers)

print(r.json())

GET /reports/dmarc

Parameters

NameInTypeRequiredDescription
max-totalquerynumberfalsenone
limitquerynumberfalsenone
pagequerynumberfalsenone

Example responses

200 Response

{
"data": {
"items": [],
"total": 0
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» items[any]falsenonenone
»» totalnumberfalsenonenone

List Incoming TLS Reports

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/reports/tls', headers = headers)

print(r.json())

GET /reports/tls

Parameters

NameInTypeRequiredDescription
limitquerynumberfalsenone
max-totalquerynumberfalsenone
pagequerynumberfalsenone

Example responses

200 Response

{
"data": {
"items": [],
"total": 0
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» items[any]falsenonenone
»» totalnumberfalsenonenone

List Incoming ARF Reports

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/reports/arf', headers = headers)

print(r.json())

GET /reports/arf

Parameters

NameInTypeRequiredDescription
pagequerynumberfalsenone
limitquerynumberfalsenone
max-totalquerynumberfalsenone

Example responses

200 Response

{
"data": {
"items": [],
"total": 0
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» items[any]falsenonenone
»» totalnumberfalsenonenone

List Stored Traces

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/telemetry/traces', headers = headers)

print(r.json())

GET /telemetry/traces

Parameters

NameInTypeRequiredDescription
typequerystringfalsenone
pagequerynumberfalsenone
limitquerynumberfalsenone
valuesquerynumberfalsenone

Example responses

200 Response

{
"error": "unsupported",
"details": "No tracing store has been configured"
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» errorstringfalsenonenone
» detailsstringfalsenonenone

Quere Log Files

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/logs', headers = headers)

print(r.json())

GET /logs

Parameters

NameInTypeRequiredDescription
pagequerynumberfalsenone
limitquerynumberfalsenone

Example responses

200 Response

{
"data": {
"items": [
{
"timestamp": "2025-01-05T14:06:29Z",
"level": "TRACE",
"event": "HTTP request body",
"event_id": "http.request-body",
"details": "listenerId = \"http\", localPort = 1443, remoteIp = ::1, remotePort = 57223, contents = \"\", size = 0"
},
{
"timestamp": "2025-01-05T14:06:29Z",
"level": "TRACE",
"event": "Write batch operation",
"event_id": "store.data-write",
"details": "elapsed = 0ms, total = 2"
},
{
"timestamp": "2025-01-05T14:06:29Z",
"level": "TRACE",
"event": "Expression evaluation result",
"event_id": "eval.result",
"details": "listenerId = \"http\", localPort = 1443, remoteIp = ::1, remotePort = 57223, id = \"server.http.allowed-endpoint\", result = \"Integer(200)\""
},
{
"timestamp": "2025-01-05T14:06:29Z",
"level": "DEBUG",
"event": "HTTP request URL",
"event_id": "http.request-url",
"details": "listenerId = \"http\", localPort = 1443, remoteIp = ::1, remotePort = 57223, url = \"/api/logs?page=1&limit=50&\""
},
{
"timestamp": "2025-01-05T14:06:23Z",
"level": "TRACE",
"event": "HTTP response body",
"event_id": "http.response-body",
"details": "listenerId = \"http\", localPort = 1443, remoteIp = ::1, remotePort = 57223, contents = \"{\"error\":\"unsupported\",\"details\":\"No tracing store has been configured\"}\", code = 200, size = 72"
},
{
"timestamp": "2025-01-05T14:06:23Z",
"level": "DEBUG",
"event": "Management operation not supported",
"event_id": "manage.not-supported",
"details": "listenerId = \"http\", localPort = 1443, remoteIp = ::1, remotePort = 57223, details = No tracing store has been configured"
},
{
"timestamp": "2025-01-05T14:06:23Z",
"level": "TRACE",
"event": "HTTP request body",
"event_id": "http.request-body",
"details": "listenerId = \"http\", localPort = 1443, remoteIp = ::1, remotePort = 57223, contents = \"\", size = 0"
},
{
"timestamp": "2025-01-05T14:06:23Z",
"level": "TRACE",
"event": "Write batch operation",
"event_id": "store.data-write",
"details": "elapsed = 0ms, total = 2"
},
{
"timestamp": "2025-01-05T14:06:23Z",
"level": "TRACE",
"event": "Expression evaluation result",
"event_id": "eval.result",
"details": "listenerId = \"http\", localPort = 1443, remoteIp = ::1, remotePort = 57223, id = \"server.http.allowed-endpoint\", result = \"Integer(200)\""
},
{
"timestamp": "2025-01-05T14:06:23Z",
"level": "DEBUG",
"event": "HTTP request URL",
"event_id": "http.request-url",
"details": "listenerId = \"http\", localPort = 1443, remoteIp = ::1, remotePort = 57223, url = \"/api/telemetry/traces?page=1&type=delivery.attempt-start&limit=10&values=1&\""
}
],
"total": 100
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» items[object]falsenonenone
»»» timestampstringfalsenonenone
»»» levelstringfalsenonenone
»»» eventstringfalsenonenone
»»» event_idstringfalsenonenone
»»» detailsstringfalsenonenone
»» totalnumberfalsenonenone

Train Spam Filter as Spam

Code samples

import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/spam-filter/train/spam', headers = headers)

print(r.json())

POST /spam-filter/train/spam

Body parameter

"From: [email protected]\nTo: [email protected]\nSubject: Testing, please ignore\nContent-Type: text/plain; charset": |
"utf-8"
Content-Transfer-Encoding: 8bit

Testing 1, 2, 3

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalsenone

|» From: [email protected] To: [email protected] Subject: Testing, please ignore Content-Type: text|body|string|false|none|

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Train Spam Filter as Ham

Code samples

import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/spam-filter/train/ham', headers = headers)

print(r.json())

POST /spam-filter/train/ham

Body parameter

"From: [email protected]\nTo: [email protected]\nSubject: Testing, please ignore\nContent-Type: text/plain; charset": |
"utf-8"
Content-Transfer-Encoding: 8bit

Testing 1, 2, 3

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalsenone

|» From: [email protected] To: [email protected] Subject: Testing, please ignore Content-Type: text|body|string|false|none|

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Train Account's Spam Filter as Spam

Code samples

import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/spam-filter/train/spam/{account_id}', headers = headers)

print(r.json())

POST /spam-filter/train/spam/{account_id}

Body parameter

"From: [email protected]\nTo: [email protected]\nSubject: Testing, please ignore\nContent-Type: text/plain; charset": |
"utf-8"
Content-Transfer-Encoding: 8bit

Testing 1, 2, 3

Parameters

NameInTypeRequiredDescription
account_idpathstringtruenone
bodybodyobjectfalsenone

|» From: [email protected] To: [email protected] Subject: Testing, please ignore Content-Type: text|body|string|false|none|

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Train Account's Spam Filter as Ham

Code samples

import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/spam-filter/train/ham/{account_id}', headers = headers)

print(r.json())

POST /spam-filter/train/ham/{account_id}

Body parameter

"From: [email protected]\nTo: [email protected]\nSubject: Testing, please ignore\nContent-Type: text/plain; charset": |
"utf-8"
Content-Transfer-Encoding: 8bit

Testing 1, 2, 3

Parameters

NameInTypeRequiredDescription
account_idpathstringtruenone
bodybodyobjectfalsenone

|» From: [email protected] To: [email protected] Subject: Testing, please ignore Content-Type: text|body|string|false|none|

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Test Spam Filter Classification

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/spam-filter/classify', headers = headers)

print(r.json())

POST /spam-filter/classify

Body parameter

{
"message": "From: [email protected]\nTo: [email protected]\nSubject: Testing, please ignore\nContent-Type: text/plain; charset=\"utf-8\"\nContent-Transfer-Encoding: 8bit\n\nTesting 1, 2, 3\n",
"remoteIp": "8.8.8.8",
"ehloDomain": "foo.org",
"authenticatedAs": null,
"isTls": true,
"envFrom": "[email protected]",
"envFromFlags": 0,
"envRcptTo": [
"[email protected]"
]
}

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalsenone
» messagebodystringfalsenone
» remoteIpbodystringfalsenone
» ehloDomainbodystringfalsenone
» authenticatedAsbodyobject¦nullfalsenone
» isTlsbodybooleanfalsenone
» envFrombodystringfalsenone
» envFromFlagsbodynumberfalsenone
» envRcptTobody[string]falsenone

Example responses

200 Response

{
"data": {
"score": 12.7,
"tags": {
"FROM_NO_DN": {
"action": "allow",
"value": 0
},
"SOURCE_ASN_15169": {
"action": "allow",
"value": 0
},
"SOURCE_COUNTRY_US": {
"action": "allow",
"value": 0
},
"MISSING_DATE": {
"action": "allow",
"value": 1
},
"FROMHOST_NORES_A_OR_MX": {
"action": "allow",
"value": 1.5
},
"MISSING_MIME_VERSION": {
"action": "allow",
"value": 2
},
"FORGED_SENDER": {
"action": "allow",
"value": 0.3
},
"SPF_NA": {
"action": "allow",
"value": 0
},
"X_HDR_TO": {
"action": "allow",
"value": 0
},
"HELO_IPREV_MISMATCH": {
"action": "allow",
"value": 1
},
"X_HDR_CONTENT_TYPE": {
"action": "allow",
"value": 0
},
"AUTH_NA": {
"action": "allow",
"value": 1
},
"FORGED_RECIPIENTS": {
"action": "allow",
"value": 2
},
"RBL_SENDERSCORE_REPUT_BLOCKED": {
"action": "allow",
"value": 0
},
"RCVD_COUNT_ZERO": {
"action": "allow",
"value": 0.1
},
"X_HDR_SUBJECT": {
"action": "allow",
"value": 0
},
"X_HDR_FROM": {
"action": "allow",
"value": 0
},
"RCPT_COUNT_ONE": {
"action": "allow",
"value": 0
},
"MISSING_MID": {
"action": "allow",
"value": 2.5
},
"TO_DOM_EQ_FROM_DOM": {
"action": "allow",
"value": 0
},
"ARC_NA": {
"action": "allow",
"value": 0
},
"RCVD_TLS_LAST": {
"action": "allow",
"value": 0
},
"X_HDR_CONTENT_TRANSFER_ENCODING": {
"action": "allow",
"value": 0
},
"HELO_NORES_A_OR_MX": {
"action": "allow",
"value": 0.3
},
"TO_DN_NONE": {
"action": "allow",
"value": 0
},
"FROM_NEQ_ENV_FROM": {
"action": "allow",
"value": 0
},
"DMARC_NA": {
"action": "allow",
"value": 1
},
"SINGLE_SHORT_PART": {
"action": "allow",
"value": 0
},
"DKIM_NA": {
"action": "allow",
"value": 0
}
},
"disposition": {
"action": "allow",
"value": "X-Spam-Result: ARC_NA (0.00),\r\n\tDKIM_NA (0.00),\r\n \tFROM_NEQ_ENV_FROM (0.00),\r\n\tFROM_NO_DN (0.00),\r\n\tRBL_SENDERSCORE_REPUT_BLOCKED (0.00),\r\n\tRCPT_COUNT_ONE (0.00),\r\n\tRCVD_TLS_LAST (0.00),\r \n\tSINGLE_SHORT_PART (0.00),\r\n\tSPF_NA (0.00),\r\n\tTO_DN_NONE (0.00),\r\n\tTO_DOM_EQ_FROM_DOM (0.00),\r\n\tRCVD_COUNT_ZERO (0.10),\r\n\tFORGED_SENDER (0.30),\r\n\tHELO_NORES_A_OR_MX (0.30),\r \n\tAUTH_NA (1.00),\r\n\tDMARC_NA (1.00),\r\n\tHELO_IPREV_MISMATCH (1.00),\r\n\tMISSING_DATE (1.00),\r\n\tFROMHOST_NORES_A_OR_MX (1.50),\r\n\tFORGED_RECIPIENTS (2.00),\r\n\tMISSING_MIME_VERSION (2.00),\r\n\tMISSING_MID (2.50)\r\nX-Spam-Status: Yes, score=12.70\r\n"
}
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» scorenumberfalsenonenone
»» tagsobjectfalsenonenone
»»» FROM_NO_DNobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» SOURCE_ASN_15169objectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» SOURCE_COUNTRY_USobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» MISSING_DATEobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» FROMHOST_NORES_A_OR_MXobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» MISSING_MIME_VERSIONobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» FORGED_SENDERobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» SPF_NAobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» X_HDR_TOobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» HELO_IPREV_MISMATCHobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» X_HDR_CONTENT_TYPEobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» AUTH_NAobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» FORGED_RECIPIENTSobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» RBL_SENDERSCORE_REPUT_BLOCKEDobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» RCVD_COUNT_ZEROobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» X_HDR_SUBJECTobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» X_HDR_FROMobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» RCPT_COUNT_ONEobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» MISSING_MIDobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» TO_DOM_EQ_FROM_DOMobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» ARC_NAobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» RCVD_TLS_LASTobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» X_HDR_CONTENT_TRANSFER_ENCODINGobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» HELO_NORES_A_OR_MXobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» TO_DN_NONEobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» FROM_NEQ_ENV_FROMobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» DMARC_NAobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» SINGLE_SHORT_PARTobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»»» DKIM_NAobjectfalsenonenone
»»»» actionstringfalsenonenone
»»»» valuenumberfalsenonenone
»» dispositionobjectfalsenonenone
»»» actionstringfalsenonenone
»»» valuestringfalsenonenone

Obtain a Troubleshooting Token

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/troubleshoot/token', headers = headers)

print(r.json())

GET /troubleshoot/token

Example responses

200 Response

{
"data": "+bS1rCUcrjoEtl9f7Vz1P6daqVs4nywxa56bHltPIASijRFrj1JrwvHxJCWphPKs/////w8E8p21+AKunrX4AndlYg=="
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» datastringfalsenonenone

Run Delivery Troubleshooting

Code samples

import requests

r = requests.get('https://mail.example.org/api/troubleshoot/delivery/{recipient}')

print(r.json())

GET /troubleshoot/delivery/{recipient}

Parameters

NameInTypeRequiredDescription
recipientpathstringtruenone
tokenquerystringfalsenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKOKNone

Response Schema

Run DMARC Troubleshooting

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/troubleshoot/dmarc', headers = headers)

print(r.json())

POST /troubleshoot/dmarc

Body parameter

{
"remoteIp": "8.8.8.8",
"ehloDomain": "mx.google.com",
"mailFrom": "[email protected]",
"body": "From: [email protected]\nTo: [email protected]\nSubject: Testing, please ignore\nContent-Type: text/plain; charset=\"utf-8\"\nContent-Transfer-Encoding: 8bit\n\nTesting 1, 2, 3\n"
}

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalsenone
» remoteIpbodystringfalsenone
» ehloDomainbodystringfalsenone
» mailFrombodystringfalsenone
» bodybodystringfalsenone

Example responses

200 Response

{
"data": {
"spfEhloDomain": "mx.google.com",
"spfEhloResult": {
"type": "none"
},
"spfMailFromDomain": "google.com",
"spfMailFromResult": {
"type": "softFail",
"details": null
},
"ipRevResult": {
"type": "pass"
},
"ipRevPtr": [
"dns.google."
],
"dkimResults": [],
"dkimPass": false,
"arcResult": {
"type": "none"
},
"dmarcResult": {
"type": "none"
},
"dmarcPass": false,
"dmarcPolicy": "reject",
"elapsed": 200
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» spfEhloDomainstringfalsenonenone
»» spfEhloResultobjectfalsenonenone
»»» typestringfalsenonenone
»» spfMailFromDomainstringfalsenonenone
»» spfMailFromResultobjectfalsenonenone
»»» typestringfalsenonenone
»»» detailsobject¦nullfalsenonenone
»» ipRevResultobjectfalsenonenone
»»» typestringfalsenonenone
»» ipRevPtr[string]falsenonenone
»» dkimResults[any]falsenonenone
»» dkimPassbooleanfalsenonenone
»» arcResultobjectfalsenonenone
»»» typestringfalsenonenone
»» dmarcResultobjectfalsenonenone
»»» typestringfalsenonenone
»» dmarcPassbooleanfalsenonenone
»» dmarcPolicystringfalsenonenone
»» elapsednumberfalsenonenone

Reload Settings

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/reload/', headers = headers)

print(r.json())

GET /reload/

Example responses

200 Response

{
"data": {
"warnings": {},
"errors": {}
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» warningsobjectfalsenonenone
»» errorsobjectfalsenonenone

Update Spam Filter

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/update/spam-filter', headers = headers)

print(r.json())

GET /update/spam-filter

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Update WebAdmin

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/update/webadmin', headers = headers)

print(r.json())

GET /update/webadmin

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Request FTS Reindex

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/reindex', headers = headers)

print(r.json())

GET /store/reindex

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Delete Global Bayes Model

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/purge/in-memory/default/bayes-global', headers = headers)

print(r.json())

GET /store/purge/in-memory/default/bayes-global

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

List Settings by Key

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/settings/keys', headers = headers)

print(r.json())

GET /settings/keys

Parameters

NameInTypeRequiredDescription
prefixesquerystringfalsenone
keysquerystringfalsenone

Example responses

200 Response

{
"data": {
"server.hostname": "mx.fr.email"
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» server.hostnamestringfalsenonenone

List Settings by Group

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/settings/group', headers = headers)

print(r.json())

GET /settings/group

Parameters

NameInTypeRequiredDescription
limitquerynumberfalsenone
pagequerynumberfalsenone
suffixquerystringfalsenone
prefixquerystringfalsenone

Example responses

200 Response

{
"data": {
"total": 11,
"items": [
{
"_id": "http",
"bind": "[::]:1443",
"protocol": "http"
},
{
"bind": "[::]:443",
"_id": "https",
"protocol": "http",
"tls.implicit": "true"
},
{
"protocol": "imap",
"bind": "[::]:143",
"_id": "imap"
},
{
"bind": "[::]:1143",
"tls.implicit": "false",
"_id": "imapnotls",
"protocol": "imap",
"proxy.override": "false",
"tls.override": "false",
"tls.enable": "false",
"socket.override": "false"
},
{
"bind": "[::]:993",
"tls.implicit": "true",
"protocol": "imap",
"_id": "imaptls"
},
{
"bind": "[::]:110",
"protocol": "pop3",
"_id": "pop3"
},
{
"tls.implicit": "true",
"_id": "pop3s",
"protocol": "pop3",
"bind": "[::]:995"
},
{
"protocol": "managesieve",
"_id": "sieve",
"bind": "[::]:4190"
},
{
"bind": "[::]:25",
"_id": "smtp",
"protocol": "smtp"
},
{
"_id": "submission",
"bind": "[::]:587",
"protocol": "smtp"
}
]
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» totalnumberfalsenonenone
»» items[object]falsenonenone
»»» _idstringfalsenonenone
»»» bindstringfalsenonenone
»»» protocolstringfalsenonenone

List Settings

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/settings/list', headers = headers)

print(r.json())

GET /settings/list

Parameters

NameInTypeRequiredDescription
prefixquerystringfalsenone

Example responses

200 Response

{
"data": {
"total": 9,
"items": {
"enable": "true",
"format": "list",
"limits.entries": "100000",
"limits.entry-size": "512",
"limits.size": "104857600",
"refresh": "12h",
"retry": "1h",
"timeout": "30s",
"url": "https://openphish.com/feed.txt"
}
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» totalnumberfalsenonenone
»» itemsobjectfalsenonenone
»»» enablestringfalsenonenone
»»» formatstringfalsenonenone
»»» limits.entriesstringfalsenonenone
»»» limits.entry-sizestringfalsenonenone
»»» limits.sizestringfalsenonenone
»»» refreshstringfalsenonenone
»»» retrystringfalsenonenone
»»» timeoutstringfalsenonenone
»»» urlstringfalsenonenone

Update Settings

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/settings', headers = headers)

print(r.json())

POST /settings

Body parameter

[
{
"type": "clear",
"prefix": "spam-filter.rule.stwt_arc_signed."
}
]

Parameters

NameInTypeRequiredDescription
bodybodyarray[object]falsenone

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Obtain Encryption-at-Rest Settings

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/account/crypto', headers = headers)

print(r.json())

GET /account/crypto

Example responses

200 Response

{
"data": {
"type": "disabled"
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» typestringfalsenonenone

Update Encryption-at-Rest Settings

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/account/crypto', headers = headers)

print(r.json())

POST /account/crypto

Body parameter

{
"type": "pGP",
"algo": "Aes256",
"certs": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n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\n=0TDv\n-----END PGP PUBLIC KEY BLOCK-----\n\n\n"
}

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalsenone
» typebodystringfalsenone
» algobodystringfalsenone
» certsbodystringfalsenone

Example responses

200 Response

{
"data": 1
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» datanumberfalsenonenone

Obtain Account Authentication Settings

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/account/auth', headers = headers)

print(r.json())

GET /account/auth

Example responses

200 Response

{
"data": {
"otpEnabled": false,
"appPasswords": []
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» otpEnabledbooleanfalsenonenone
»» appPasswords[any]falsenonenone

Update Account Authentication Settings

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/account/auth', headers = headers)

print(r.json())

POST /account/auth

Body parameter

[
{
"type": "addAppPassword",
"name": "dGVzdCQyMDI1LTAxLTA1VDE0OjEyOjUxLjg0NyswMDowMA==",
"password": "$6$4M/5LmG7b13r0cdE$6zb.i6wJ3pAQHA2MRHkKg0t8bgSYb2IeqiIU115t.NugwW6VXifE0VKI5n2BQUNwdeDMUzaX82TmhuVVgC0Gx1"
}
]

Parameters

NameInTypeRequiredDescription
bodybodyarray[object]falsenone

Example responses

200 Response

{
"error": "other",
"details": "Fallback administrator accounts do not support 2FA or AppPasswords",
"reason": null
}

401 Response

{
"type": "about:blank",
"status": 401,
"title": "Unauthorized",
"detail": "You have to authenticate first."
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline
401UnauthorizedUnauthorizedInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» errorstringfalsenonenone
» detailsstringfalsenonenone
» reasonobject¦nullfalsenonenone

Status Code 401

NameTypeRequiredRestrictionsDescription
» typestringfalsenonenone
» statusnumberfalsenonenone
» titlestringfalsenonenone
» detailstringfalsenonenone

Stop Queue Processing

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.patch('https://mail.example.org/api/queue/status/stop', headers = headers)

print(r.json())

PATCH /queue/status/stop

Example responses

200 Response

{
"data": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» databooleanfalsenonenone

Resume Queue Processing

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.patch('https://mail.example.org/api/queue/status/start', headers = headers)

print(r.json())

PATCH /queue/status/start

Example responses

200 Response

{
"data": false
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» databooleanfalsenonenone

Obtain Queued Message Details

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/queue/messages/{message_id}', headers = headers)

print(r.json())

GET /queue/messages/{message_id}

Parameters

NameInTypeRequiredDescription
message_idpathstringtruenone

Example responses

200 Response

{
"data": {
"id": 217700302698266620,
"return_path": "[email protected]",
"domains": [
{
"name": "example.org",
"status": "scheduled",
"recipients": [
{
"address": "[email protected]",
"status": "scheduled"
}
],
"retry_num": 0,
"next_retry": "2025-01-05T14:33:15Z",
"next_notify": "2025-01-06T14:33:15Z",
"expires": "2025-01-10T14:33:15Z"
}
],
"created": "2025-01-05T14:33:15Z",
"size": 1451,
"blob_hash": "ykrZ_KghvdG2AdjH4AZajkSvZvcsxP_oI2HEZvw-tS0"
}
}

404 Response

{
"type": "about:blank",
"status": 404,
"title": "Not Found",
"detail": "The requested resource does not exist on this server."
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline
404Not FoundNot FoundInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» idnumberfalsenonenone
»» return_pathstringfalsenonenone
»» domains[object]falsenonenone
»»» namestringfalsenonenone
»»» statusstringfalsenonenone
»»» recipients[object]falsenonenone
»»»» addressstringfalsenonenone
»»»» statusstringfalsenonenone
»»» retry_numnumberfalsenonenone
»»» next_retrystringfalsenonenone
»»» next_notifystringfalsenonenone
»»» expiresstringfalsenonenone
»» createdstringfalsenonenone
»» sizenumberfalsenonenone
»» blob_hashstringfalsenonenone

Status Code 404

NameTypeRequiredRestrictionsDescription
» typestringfalsenonenone
» statusnumberfalsenonenone
» titlestringfalsenonenone
» detailstringfalsenonenone

Reschedule Delivery of Queued Message

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.patch('https://mail.example.org/api/queue/messages/{message_id}', headers = headers)

print(r.json())

PATCH /queue/messages/{message_id}

Parameters

NameInTypeRequiredDescription
message_idpathstringtruenone

Example responses

200 Response

{
"data": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» databooleanfalsenonenone

Cancel Delivery of Queued Message

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.delete('https://mail.example.org/api/queue/messages/{message_id}', headers = headers)

print(r.json())

DELETE /queue/messages/{message_id}

Parameters

NameInTypeRequiredDescription
message_idpathstringtruenone

Example responses

200 Response

{
"data": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» databooleanfalsenonenone

Fetch Blob by ID

Code samples

import requests

r = requests.get('https://mail.example.org/api/store/blobs/{blob_id}')

print(r.json())

GET /store/blobs/{blob_id}

Parameters

NameInTypeRequiredDescription
blob_idpathstringtruenone
limitquerynumberfalsenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKOKNone

Response Schema

Obtain Trace Details

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/telemetry/trace/{trace_id}', headers = headers)

print(r.json())

GET /telemetry/trace/{trace_id}

Parameters

NameInTypeRequiredDescription
trace_idpathstringtruenone

Example responses

200 Response

{
"data": [
{
"text": "SMTP connection started",
"details": "A new SMTP connection was started",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.connection-start",
"data": {
"listenerId": "smtp",
"localPort": 25,
"remoteIp": "::1",
"remotePort": 57513
}
},
{
"text": "SMTP EHLO command",
"details": "The remote server sent an EHLO command",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.ehlo",
"data": {
"domain": "test.eml"
}
},
{
"text": "SPF EHLO check failed",
"details": "EHLO identity failed SPF check",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.spf-ehlo-fail",
"data": {
"domain": "test.eml",
"result": {
"type": "spf.none",
"text": "No SPF record",
"details": "No SPF record was found",
"data": {}
},
"elapsed": 24
}
},
{
"text": "IPREV check passed",
"details": "Reverse IP check passed",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.iprev-pass",
"data": {
"domain": "test.eml",
"result": {
"type": "iprev.pass",
"text": "IPREV check passed",
"details": "The IPREV check has passed",
"data": {
"details": [
"localhost."
]
}
},
"elapsed": 0
}
},
{
"text": "SPF From check failed",
"details": "MAIL FROM identity failed SPF check",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.spf-from-fail",
"data": {
"domain": "test.eml",
"from": "[email protected]",
"result": {
"type": "spf.none",
"text": "No SPF record",
"details": "No SPF record was found",
"data": {}
},
"elapsed": 18
}
},
{
"text": "SMTP MAIL FROM command",
"details": "The remote client sent a MAIL FROM command",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.mail-from",
"data": {
"from": "[email protected]"
}
},
{
"text": "SMTP RCPT TO command",
"details": "The remote client sent an RCPT TO command",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.rcpt-to",
"data": {
"to": "[email protected]"
}
},
{
"text": "DKIM verification failed",
"details": "Failed to verify DKIM signature",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.dkim-fail",
"data": {
"strict": false,
"result": [],
"elapsed": 0
}
},
{
"text": "ARC verification passed",
"details": "Successful ARC verification",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.arc-pass",
"data": {
"strict": false,
"result": {
"type": "dkim.none",
"text": "No DKIM signature",
"details": "No DKIM signature was found",
"data": {}
},
"elapsed": 0
}
},
{
"text": "DMARC check failed",
"details": "Failed to verify DMARC policy",
"createdAt": "2025-01-05T14:34:50Z",
"type": "smtp.dmarc-fail",
"data": {
"strict": false,
"domain": "example.org",
"policy": "reject",
"result": {
"type": "dmarc.none",
"text": "No DMARC record",
"details": "No DMARC record was found",
"data": {}
},
"elapsed": 0
}
}
]
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» data[object]falsenonenone
»» textstringfalsenonenone
»» detailsstringfalsenonenone
»» createdAtstringfalsenonenone
»» typestringfalsenonenone
»» dataobjectfalsenonenone
»»» listenerIdstringfalsenonenone
»»» localPortnumberfalsenonenone
»»» remoteIpstringfalsenonenone
»»» remotePortnumberfalsenonenone

Request a Tracing Token

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/telemetry/live/tracing-token', headers = headers)

print(r.json())

GET /telemetry/live/tracing-token

Example responses

200 Response

{
"data": "VLxkixOwgDF8Frj0wi8kPhx3SpzKqtsDvbo25wgKw2tBIz/O8La0dwioQw9pN11c/////w8Ctau1+ALxq7X4AndlYg=="
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» datastringfalsenonenone

Start Live Tracing

Code samples

import requests

r = requests.get('https://mail.example.org/api/telemetry/traces/live')

print(r.json())

GET /telemetry/traces/live

Parameters

NameInTypeRequiredDescription
filterquerystringfalsenone
tokenquerystringfalsenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKOKNone

Response Schema

Obtain DNS Records for Domain

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/dns/records/{domain}', headers = headers)

print(r.json())

GET /dns/records/{domain}

Parameters

NameInTypeRequiredDescription
domainpathstringtruenone

Example responses

200 Response

{
"data": [
{
"type": "MX",
"name": "example.org.",
"content": "10 mx.fr.email."
},
{
"type": "CNAME",
"name": "mail.example.org.",
"content": "mx.fr.email."
},
{
"type": "TXT",
"name": "202501e._domainkey.example.org.",
"content": "v=DKIM1; k=ed25519; h=sha256; p=82LqzMGRHEBI2HGDogjojWGz+Crrv0TAi8pcaOBd1vw="
},
{
"type": "TXT",
"name": "202501r._domainkey.example.org.",
"content": "v=DKIM1; k=rsa; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1qtCbIlrZffIqm7gHqpihPUlxOq1zD6K3j1RO/enhkZRp5dEdCqcLbyFk5d+rqRsVIWwUZiU4HXHWqMTN1hlKojUlzmU1JYtlHRMwtM5vN4mzG4x1KA0i8ZHxkahE8ITsP+kPByDF9x0vAySHXpyErNXq3BeFyu/VW+6X+fmUW6x39PfWq7kQQTcwU0Ogo447oJfmAX9H4Z+/cD5WJVNiLgvLY6faVgoXm0mJJjRU5xoEStXoUcKwrwbl7G3K7JfxtmWsgEn97auV6v4he2LRRfTxbY9smkqUtcJs61E9iyyYroJv0iRda2pv71qg8e4wTb2sqBloZv/F2FZQhM+wIDAQAB"
},
{
"type": "TXT",
"name": "example.org.",
"content": "v=spf1 mx ra=postmaster -all"
},
{
"type": "SRV",
"name": "_jmap._tcp.example.org.",
"content": "0 1 443 mx.fr.email."
},
{
"type": "SRV",
"name": "_imaps._tcp.example.org.",
"content": "0 1 993 mx.fr.email."
},
{
"type": "SRV",
"name": "_imap._tcp.example.org.",
"content": "0 1 143 mx.fr.email."
},
{
"type": "SRV",
"name": "_imap._tcp.example.org.",
"content": "0 1 1143 mx.fr.email."
},
{
"type": "SRV",
"name": "_pop3s._tcp.example.org.",
"content": "0 1 995 mx.fr.email."
}
]
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» data[object]falsenonenone
»» typestringfalsenonenone
»» namestringfalsenonenone
»» contentstringfalsenonenone

Purge Account

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/purge/account/{account_id}', headers = headers)

print(r.json())

GET /store/purge/account/{account_id}

Parameters

NameInTypeRequiredDescription
account_idpathstringtruenone

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Delete Bayes Model for Account

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/purge/in-memory/default/bayes-account/{account_id}', headers = headers)

print(r.json())

GET /store/purge/in-memory/default/bayes-account/{account_id}

Parameters

NameInTypeRequiredDescription
account_idpathstringtruenone

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

List Deleted Messages

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/undelete/{account_id}', headers = headers)

print(r.json())

GET /store/undelete/{account_id}

Parameters

NameInTypeRequiredDescription
account_idpathstringtruenone
limitquerynumberfalsenone
pagequerynumberfalsenone

Example responses

200 Response

{
"data": {
"items": [],
"total": 0
}
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobjectfalsenonenone
»» items[any]falsenonenone
»» totalnumberfalsenonenone

Undelete Messages

Code samples

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('https://mail.example.org/api/store/undelete/{account_id}', headers = headers)

print(r.json())

POST /store/undelete/{account_id}

Body parameter

[
{
"hash": "9pDYGrkDlLYuBNl062qhi0wStnDYyq4ZWalnj2vXbLY",
"collection": "email",
"restoreTime": "2025-01-05T14:50:13Z",
"cancelDeletion": "2025-02-04T14:50:13Z"
}
]

Parameters

NameInTypeRequiredDescription
account_idpathstringtruenone
bodybodyarray[object]falsenone

Example responses

200 Response

{
"data": [
{
"type": "success"
}
]
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» data[object]falsenonenone
»» typestringfalsenonenone

Obtain Queue Status

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/queue/status', headers = headers)

print(r.json())

GET /queue/status

Example responses

200 Response

{
"data": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» databooleanfalsenonenone

Purge Blob Store

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/purge/blob', headers = headers)

print(r.json())

GET /store/purge/blob

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Purge Data Store

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/purge/data', headers = headers)

print(r.json())

GET /store/purge/data

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Purge In-Memory Store

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/purge/in-memory', headers = headers)

print(r.json())

GET /store/purge/in-memory

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Purge All Accounts

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('https://mail.example.org/api/store/purge/account', headers = headers)

print(r.json())

GET /store/purge/account

Example responses

200 Response

{
"data": null
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» dataobject¦nullfalsenonenone

Reset IMAP UIDs for Account

Code samples

import requests
headers = {
'Accept': 'application/json'
}

r = requests.delete('https://mail.example.org/api/store/uids/{account_id}', headers = headers)

print(r.json())

DELETE /store/uids/{account_id}

Parameters

NameInTypeRequiredDescription
account_idpathstringtruenone

Example responses

200 Response

{
"data": [
0,
0
]
}

Responses

StatusMeaningDescriptionSchema
200OKOKInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» data[number]falsenonenone