Block from a message

.md

Refuse further mail from whoever sent this one.

Scopesmail:write
POST/v1/me/mail/messages/{id}/block

Blocks the address in the message's From, or its whole domain. The From because that is the address on the screen. Check sender_check on the message first: when it says unverified, the address was probably forged and blocking it stops little.

The path takes the message's id, such as msg_trhtcshms7w2bmxr. A number there answers 404, like a message you cannot read.

Request

curl -X POST https://api.proppertrading.com/v1/me/mail/messages/msg_trhtcshms7w2bmxr/block \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 9e1c3a5b-7d9f-4b1d-8e3a-5c7e9a1b3d5f" \
  -d '{ "kind": "domain" }'
FieldDescription
kindaddress for the one address, domain for all of it

Response

The same as blocking a sender: 201 with the new entry, or 200 with the one that was there.

{
    "data": {
    "id": "blk_5ws77sgyjhhkqb66",
    "object": "mail_blocked_sender",
    "kind": "domain",
    "pattern": "amexp.com",
    "author": "Mick Schmidt",
    "created_at": "2026-09-25T10:14:02.000000Z",
    "hits": 3,
    "last_hit_at": "2026-09-25T16:40:51.000000Z"
},
    "meta": { "request_id": "req_01kz4bkr1aj1gv63d8fv3133ey" }
}

Errors

StatusCodeMeaning
400missing_idempotency_keyEvery POST needs one
400invalid_senderThe message has no sender address
400own_senderIt came from one of this environment's own addresses
403insufficient_scopeThis device does not hold mail:write
403forbiddenThe account does not hold manage_mailbox
404resource_not_foundNo such message in a mailbox you can read
422validation_failedkind missing or not one of the two