Block a sender

POST/api/v1/mailbox/blocked-senders
Requires amailbox token— it acts as one mailbox holder, not as the organization.

Mail from this address goes straight to Junk. One full address per call (whole domains cannot be blocked); up to 500.

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 body

  • addressstringrequired

    The full address to block.

Request

POST/api/v1/mailbox/blocked-senders
curl -X POST 'https://courier.mailyte.com/api/v1/mailbox/blocked-senders' \
  -H 'Authorization: Bearer MAILBOX_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "address": "spam@example.net"
  }'

Response

Successful Response

  • dataobject
    • addressesarray<string>
    • managedboolean
    • folderstring

      Where their mail goes instead.

    • limitinteger
200application/json
{
  "type": "success",
  "msg": "Sender blocked",
  "data": {
    "addresses": [
      "spam@example.net"
    ],
    "managed": true,
    "folder": "Junk",
    "limit": 500
  }
}

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`.
422Validation Error

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