Read filter rules

GET/api/v1/mailbox/rules
Requires amailbox token— it acts as one mailbox holder, not as the organization.

The rules applied to new mail, in order.

Errors

Status When
401 No token, or the session expired or was signed out. Sign in again with POST /mailbox-auth/login.
403 The account has a temporary password: until POST /security/password succeeds, every other call answers this with error_code: password_change_required.

Request

GET/api/v1/mailbox/rules
curl -X GET 'https://courier.mailyte.com/api/v1/mailbox/rules' \
  -H 'Authorization: Bearer MAILBOX_TOKEN'

Response

Successful Response

  • dataobject
    • rulesarray<object>
      • idstring
      • namestring
      • matchstringall | any
      • enabledboolean
      • conditionsarray<object>
        • fieldstring

          from, to, cc, subject or body.

        • operatorstring

          contains (the default), is, or matches (with * and ? wildcards).

        • valuestring
      • actionsarray<object>
        • typestring

          move (value: a folder), label (value: a label), flag, mark_read, forward (value: an address) or discard.

        • valuestring
200application/json
{
  "type": "success",
  "msg": "Rules retrieved successfully",
  "data": {
    "rules": [
      {
        "id": "r1",
        "name": "Invoices to Finance",
        "match": "any",
        "enabled": true,
        "conditions": [
          {
            "field": "subject",
            "operator": "contains",
            "value": "invoice"
          }
        ],
        "actions": [
          {
            "type": "move",
            "value": "Finance"
          }
        ]
      }
    ]
  }
}

Returned inside the standard envelope.

Errors

StatusWhen
401No token, or the session expired or was signed out. Sign in again with `POST /mailbox-auth/login`.
403The account has a temporary password: until `POST /security/password` succeeds, every other call answers this with `error_code: password_change_required`.

Every status, with what causes it and what to do, is on the error reference.