# Unsubscribes and blocks

Who may not be emailed, and why: unsubscribes, bounces, spam complaints and the blocks you set.

## Two different things

| | Unsubscribed | Blocked |
| --- | --- | --- |
| Why | The person unsubscribed | The address bounced, the person reported spam, or you blocked it |
| Campaigns and broadcasts | Not sent | Not sent |
| Transactional email | Still sent | Not sent |
| Undo | A resubscribe, with consent | An unblock |

Both are kept for the address, not the contact, so they survive deleting the contact and adding it again. The contact’s `is_unsubscribed` and `is_blocked` show the current state.

## Unsubscribes

Every marketing email carries an unsubscribe link and the one-click unsubscribe header mail clients show next to the sender. A recipient who uses either is unsubscribed at once, and the campaigns they are in end for them. You can also unsubscribe an address yourself.

## Resubscribes need consent

Opting someone back in needs proof that they asked: the wording they agreed to, when, and where from. Every resubscribe records that consent.

```sh Resubscribe an address
curl -X POST "https://sendocado.com/api/v1/projects/$PROJECT_ID/resubscribes" \
  -H "Authorization: Bearer $SENDOCADO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "maya@example.com",
  "consent": {
    "wording": "Yes, send me product updates from Acme.",
    "ip_address": "203.0.113.42",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6)",
    "consented_at": 1789999940000
  }
}'
```

## Bounces and spam complaints

A permanent bounce (the mailbox does not exist) blocks the address. A temporary bounce, like a full mailbox, does not. A spam complaint blocks the address too, and unblocking it later needs consent.

## Manual blocks and unblocks

Block an address to stop all email to it, transactional included. An unblock clears the bounces, complaints and manual blocks recorded so far; it never clears an unsubscribe.

## The list

List blocked and unsubscribed addresses by reason. `is_still_blocked` turns false when a later unblock or resubscribe cleared the row, so the list is also the history.

See the [Unsubscribes and blocks reference](https://sendocado.com/docs/api/blocked-list) for every route.
