Inspect receiving rules
GET /v1/inboxes/{inbox_id}/receiving-policy
Read as Markdown ↗GET /v1/inboxes/{inbox_id}/receiving-policy
Requires an API key: Authorization: Bearer YOUR_CREDENTIAL.
Shows the inbox's blocked senders. With enabled: true, mail whose From address matches an entry in addresses or domains does not arrive, and no copy is kept. With enabled: false nothing is blocked, and the saved lists stay. Mail already received isn't affected by a change.
Entries match as in sending rules.
The From address is written by the sender and isn't authenticated, so these rules stop unwanted mail from a sender, not a sender who forges another address. They can be changed only in Account → Receiving rules, not through the API. Receiving rules guide
Parameters
| Parameter | Location | Required | Type | Meaning |
|---|---|---|---|---|
inbox_id | path | Yes | string | Cherami resource ID returned by the API. |
curl example
Supply CHERAMI_API_KEY privately.
curl --silent --show-error --include --request GET \
"https://cherami.to/v1/inboxes/INBOX_ID/receiving-policy" \
--header "Authorization: Bearer $CHERAMI_API_KEY"Responses
HTTP 200
Success.
X-Request-ID: Identifies this request; include it when reporting a problem.
Content type: application/json.
{
"inbox_id": "11111111-1111-4111-8111-111111111111",
"enabled": true,
"addresses": [],
"domains": [],
"revision": 0
}HTTP 401
unauthorized: Send a valid API key as Authorization: Bearer <key>. If the key stopped working, get a new one through recovery.
X-Request-ID: Identifies this request; include it when reporting a problem.WWW-Authenticate:"Bearer"
Content type: application/json.
HTTP 404
not_found: The resource does not exist or does not belong to this account. A reply or forward source must also be in the sending inbox.
X-Request-ID: Identifies this request; include it when reporting a problem.
Content type: application/json.
HTTP 500
internal_error: The operation failed. Retry a read; after a write the change may have happened, so recover as retry by operation describes.
X-Request-ID: Identifies this request; include it when reporting a problem.
Content type: application/json.
Schema: Policy
| Field | Required | Type | Meaning and constraints |
|---|---|---|---|
inbox_id | Yes | string | Cherami resource ID. |
enabled | Yes | boolean | |
addresses | Yes | array of string | maxItems: 100 |
domains | Yes | array of string | maxItems: 100 |
revision | Yes | integer | Saved policy version; zero when unconfigured. minimum: 0 |
Schema: Error
| Field | Required | Type | Meaning and constraints |
|---|---|---|---|
error | Yes | object |
error fields
| Field | Required | Type | Meaning and constraints |
|---|---|---|---|
code | Yes | string | Code to handle. Handle a code you don't recognize by its HTTP status. |
message | Yes | string | Explanation of this case; its wording can change. |