# How do I export my suppression list?

> Page through the Suppressions API and write every address to a CSV file.

Newsletter tools such as Sendy, listmonk, and Mautic keep their own subscriber status. When they send through PostShiba over SMTP, bounces go to PostShiba, not to the tool. PostShiba suppresses hard bounces and spam reports and refuses later sends to those addresses with `550 suppressed`, but the tool still lists them as active. Export the suppression list and import it into the tool's blocklist to keep your lists clean.

## Before you start

- A **Support** API key and your **Team id**, both on **API keys**. A Support key can read suppressions and cannot send. See [API keys](/docs/dashboard/api-keys/introduction).
- `curl` and `jq`.

## Export every address

The script pages through the [Suppressions API](/docs/api-reference/suppressions) 1,000 rows at a time, using the last row's `id` as `after`.

```bash export-suppressions.sh
export POSTSHIBA_API_KEY="YOUR_API_KEY"
export TEAM_ID="KjkAJW"

after=""
: > postshiba-suppressions.csv
while true; do
  page=$(curl -sS --get \
    --url "https://app.postshiba.com/api/v1/teams/$TEAM_ID/suppressions" \
    --header "Authorization: Bearer $POSTSHIBA_API_KEY" \
    --data-urlencode "limit=1000" \
    ${after:+--data-urlencode "after=$after"})
  echo "$page" | jq -r '.[].email' >> postshiba-suppressions.csv
  [ "$(echo "$page" | jq length)" -lt 1000 ] && break
  after=$(echo "$page" | jq -r '.[-1].id')
done
wc -l postshiba-suppressions.csv
```

The file has one address per line and no header row.

## Export by reason

Each row has a `reason`: `bounce`, `spamreport`, `unsubscribe`, or `manual`. To export only hard bounces and spam reports, change the `jq` filter.

```bash filter-reasons.sh
echo "$page" | jq -r '.[] | select(.reason == "bounce" or .reason == "spamreport") | .email' >> postshiba-suppressions.csv
```

Run the export again after each large campaign. Importing an address the tool already blocks does no harm.

## Next steps

- [How to manage suppressions](/docs/dashboard/emails/email-suppressions)
- [Why did an address land on suppressions?](/docs/knowledge-base/why-are-my-emails-landing-on-the-suppression-list)
- [Suppressions API](/docs/api-reference/suppressions)
