> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailchannels.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Suppression List

> Retrieve suppression entries associated with the specified account.
Supports filtering by recipient, source and creation date range.
The response is paginated, with a default limit of 1000 entries per page and an offset of 0.




## OpenAPI

````yaml /email-api/api-reference/openapi.yaml get /suppression-list
openapi: 3.0.0
info:
  contact:
    email: support@mailchannels.com
    name: MailChannels Corporation
  description: >
    This is the API reference for Email API. Here, you'll find more detailed
    information on every endpoint, including parameters, response formats, and
    error codes.
  title: Email API
  version: 1.4.0
servers:
  - url: https://api.mailchannels.net/tx/v1
security: []
tags:
  - name: Send
  - name: DKIM
  - name: Metrics
  - name: Sub-accounts
  - name: Suppression
  - name: Webhooks
  - name: Usage
  - name: Custom Tracking
paths:
  /suppression-list:
    get:
      tags:
        - Suppression
      summary: Retrieve Suppression List
      description: >
        Retrieve suppression entries associated with the specified account.

        Supports filtering by recipient, source and creation date range.

        The response is paginated, with a default limit of 1000 entries per page
        and an offset of 0.
      parameters:
        - in: query
          name: recipient
          required: false
          schema:
            maxLength: 255
            type: string
        - in: query
          name: source
          required: false
          schema:
            enum:
              - api
              - unsubscribe_link
              - list_unsubscribe
              - hard_bounce
              - spam_complaint
            type: string
        - description: >
            The date and/or time before which the suppression entries were
            created.

            Format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ
          in: query
          name: created_before
          required: false
          schema:
            type: string
        - description: >
            The date and/or time after which the suppression entries were
            created.

            Format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ
          in: query
          name: created_after
          required: false
          schema:
            type: string
        - description: >
            The maximum number of suppression entries to return. The default is
            1000.
          in: query
          name: limit
          required: false
          schema:
            default: 1000
            maximum: 1000
            minimum: 1
            type: integer
        - description: >
            The number of suppression entries to skip before returning results.
            The default is 0.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            minimum: 0
            type: integer
        - in: header
          name: X-Api-Key
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuppressionListResponse'
          description: >-
            Successfully retrieved all suppression entries associated with the
            account.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request. The request is invalid.
        '500':
          description: An unexpected internal error occurred.
      x-codeSamples:
        - label: Node.js
          lang: javascript
          source: >-
            import { MailChannels } from "mailchannels-sdk";


            const { MAILCHANNELS_API_KEY } = process.env;

            if (!MAILCHANNELS_API_KEY) throw new Error("Set MAILCHANNELS_API_KEY
            before running");


            const mailchannels = new MailChannels(MAILCHANNELS_API_KEY);


            const { data, error } = await mailchannels.suppressions.list();


            if (error) {
              console.error("List suppressions failed:", error);
              process.exit(1);
            }

            console.log(data);
        - label: Python
          lang: python
          source: |-
            import os
            import sys

            import mailchannels

            if not os.environ.get("MAILCHANNELS_API_KEY"):
                sys.exit("Set MAILCHANNELS_API_KEY (parent or sub-account) before running")

            # Retrieve suppression entries for the account.
            response = mailchannels.Suppressions.list()

            print(response)
        - label: PHP
          lang: php
          source: >-
            <?php


            require_once __DIR__ . '/vendor/autoload.php';


            use MailChannels\Client;


            $api_key = getenv('MAILCHANNELS_API_KEY') or exit("Error:
            MAILCHANNELS_API_KEY is not set\n");


            $client = new Client(apiKey: $api_key);


            // Retrieve suppression entries for the account.

            $response = $client->suppressions->list();


            print_r($response->toArray());
components:
  schemas:
    SuppressionListResponse:
      properties:
        suppression_list:
          items:
            $ref: '#/components/schemas/SuppressionEntryResponse'
          maxItems: 1000
          type: array
      required:
        - suppression_list
      type: object
    ErrorResponse:
      properties:
        errors:
          description: >
            This is an array error objects that provide machine and human
            readable descriptions of the errors.
          items:
            type: string
          type: array
      type: object
    SuppressionEntryResponse:
      properties:
        created_at:
          format: date-time
          type: string
        notes:
          maxLength: 1024
          nullable: true
          type: string
        recipient:
          maxLength: 255
          type: string
        sender:
          nullable: true
          type: string
        source:
          enum:
            - api
            - unsubscribe_link
            - list_unsubscribe
            - hard_bounce
            - spam_complaint
          type: string
        suppression_types:
          items:
            enum:
              - transactional
              - non-transactional
            type: string
          type: array
      required:
        - recipient
      type: object

````