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

# List suppressions

> Account-scoped list. Two mutually exclusive pagination modes:

  - **Offset**: `page[number]` (default 1) + `page[size]`
    (default 25, max 100). `meta` contains `total_pages`.
  - **Cursor**: `page[after]` and/or `page[before]` (opaque
    `Base.url_encode64` of `{"created_at","id"}`). Cannot combine
    with `page[number]`; `after`+`before` together is an error.
    `meta` contains `next_cursor` / `previous_cursor` (omitted when
    their flag is false).

Sort defaults to `-created_at` (desc); only `created_at` is sortable.
A `--` prefix is an error. `nil`/empty filter values are silently dropped.




## OpenAPI

````yaml /openapi/source/external/email/email.json get /email_blocks
openapi: 3.0.3
info:
  x-latency-category: responsive
  x-endpoint-cost: light
  title: Telnyx API
  description: >-
    Programmable email: sending, templates, validation, events, agent inboxes,
    drafts, threads, domains & DKIM, suppressions and unsubscribe groups.
  version: 2.0.0
  contact:
    name: Telnyx
    url: https://telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - BearerAuth: []
tags:
  - name: Email Validations
    description: Validate email addresses synchronously or in asynchronous batches.
  - name: Email Templates
    description: Create, list, retrieve, update, delete, and render Liquid email templates.
  - name: Email Messages
    description: >-
      Send and manage email messages. Legacy `/v2/emails` routes are aliases for
      these endpoints.
  - name: Email Events
    description: Retrieve account-level email events and event statistics.
  - name: Email Inboxes
    description: >-
      Create and manage agent inboxes, retrieve inbound messages and threads,
      and reply to or forward messages.
  - name: Email Drafts
    description: >-
      Create, list, retrieve, update, delete, and send unsent draft messages
      belonging to an agent inbox.
  - name: Email Threads
    description: >-
      Account-wide conversation threads across every inbox, for agents operating
      many inboxes at once.
  - name: Email Domains
    description: Email domain CRUD operations
  - name: Email Domain DNS Records
    description: DNS verification records for email domains
  - name: Email Webhooks
    description: Per-domain webhook endpoints with event subscriptions
  - name: Email Suppressions
    description: Recipient suppression records (`/v2/email_blocks`).
  - name: Email Suppression Imports
    description: Async CSV import of competitor suppression lists.
  - name: Email Unsubscribe Groups
    description: Named groups and group-scoped suppressions.
paths:
  /email_blocks:
    get:
      tags:
        - Email Suppressions
      summary: List suppressions
      description: >
        Account-scoped list. Two mutually exclusive pagination modes:

          - **Offset**: `page[number]` (default 1) + `page[size]`
            (default 25, max 100). `meta` contains `total_pages`.
          - **Cursor**: `page[after]` and/or `page[before]` (opaque
            `Base.url_encode64` of `{"created_at","id"}`). Cannot combine
            with `page[number]`; `after`+`before` together is an error.
            `meta` contains `next_cursor` / `previous_cursor` (omitted when
            their flag is false).

        Sort defaults to `-created_at` (desc); only `created_at` is sortable.

        A `--` prefix is an error. `nil`/empty filter values are silently
        dropped.
      operationId: listEmailBlocks
      parameters:
        - $ref: '#/components/parameters/BlocksPageNumber'
        - $ref: '#/components/parameters/BlocksPageSize'
        - $ref: '#/components/parameters/BlocksPageAfter'
        - $ref: '#/components/parameters/BlocksPageBefore'
        - $ref: '#/components/parameters/SortEmailBlocks'
        - $ref: '#/components/parameters/FilterReason'
        - $ref: '#/components/parameters/FilterDomainId'
        - $ref: '#/components/parameters/FilterCreatedAfter'
        - $ref: '#/components/parameters/FilterCreatedBefore'
      responses:
        '200':
          description: List of suppressions.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/EmailBlockListOffsetResponse'
                  - $ref: '#/components/schemas/EmailBlockListCursorResponse'
              example:
                data:
                  - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    record_type: email_block
                    domain_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    group_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    from: string
                    to: string
                    reason: hard_bounce
                    source: feedback
                    scope: account
                    status: active
                    created_at: '2024-01-23T18:10:02.574Z'
                    updated_at: '2024-01-23T18:10:02.574Z'
                    expires_at: '2024-01-23T18:10:02.574Z'
                meta:
                  page_number: 0
                  page_size: 0
                  total_pages: 0
                  total_results: 0
        '400':
          $ref: '#/components/responses/ValidationErrorQuery'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '406':
          $ref: '#/components/responses/FrameworkError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            // Automatically fetches more pages as needed.
            for await (const response of client.emailBlocks.list()) {
              console.log(response);
            }
        - lang: Python
          source: |
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            page = client.email_blocks.list()
            print(page)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\temailBlocks, err := client.EmailBlocks.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", emailBlocks.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    var page = client.emailBlocks().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            page = telnyx.email_blocks.list

            puts(page)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $page = $client->emailBlocks->list();

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx email-blocks list \
              --api-key 'My API Key'
components:
  parameters:
    BlocksPageNumber:
      name: page[number]
      in: query
      description: Offset page number (≥1, default 1).
      schema:
        type: integer
        minimum: 1
        default: 1
    BlocksPageSize:
      name: page[size]
      in: query
      description: Page size (1–100, default 25).
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    BlocksPageAfter:
      name: page[after]
      in: query
      description: >-
        Opaque cursor (`Base.url_encode64` of `{"created_at","id"}`). Cursor
        mode; mutually exclusive with `page[number]` and `page[before]`.
      schema:
        type: string
    BlocksPageBefore:
      name: page[before]
      in: query
      description: >-
        Opaque cursor (see `page[after]`). Mutually exclusive with `page[after]`
        and `page[number]`.
      schema:
        type: string
    SortEmailBlocks:
      name: sort
      in: query
      description: >-
        Sort field. Leading `-` = desc; only `created_at` is sortable. Default
        `-created_at`. `--` is an error.
      schema:
        type: string
        default: '-created_at'
        enum:
          - created_at
          - '-created_at'
    FilterReason:
      name: filter[reason]
      in: query
      description: Exact-match filter on reason.
      schema:
        $ref: '#/components/schemas/Reason'
    FilterDomainId:
      name: filter[domain_id]
      in: query
      description: Exact-match filter on domain_id (UUID).
      schema:
        type: string
        format: uuid
    FilterCreatedAfter:
      name: filter[created_after]
      in: query
      description: '`created_at > value` (ISO 8601).'
      schema:
        type: string
        format: date-time
    FilterCreatedBefore:
      name: filter[created_before]
      in: query
      description: '`created_at < value` (ISO 8601).'
      schema:
        type: string
        format: date-time
  schemas:
    EmailBlockListOffsetResponse:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EmailBlock'
        meta:
          $ref: '#/components/schemas/OffsetMeta'
    EmailBlockListCursorResponse:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EmailBlock'
        meta:
          $ref: '#/components/schemas/CursorMeta'
    Reason:
      type: string
      enum:
        - hard_bounce
        - spam_complaint
        - unsubscribe
        - invalid
        - manual_block
    EmailBlock:
      type: object
      required:
        - id
        - record_type
        - to
        - reason
        - source
        - scope
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        record_type:
          type: string
          enum:
            - email_block
          description: View-only discriminator.
        domain_id:
          type: string
          format: uuid
          nullable: true
          description: '`null` ⇒ account scope. Stored on the row; exposed here.'
        group_id:
          type: string
          format: uuid
          nullable: true
          description: '`null` ⇒ global; set ⇒ group-scoped opt-out.'
        from:
          type: string
          nullable: true
          description: '`null` ⇒ not address-scope. (schema: from_address)'
        to:
          type: string
          description: 'Normalized recipient. (schema: to_address)'
        reason:
          $ref: '#/components/schemas/Reason'
        source:
          $ref: '#/components/schemas/Source'
        scope:
          $ref: '#/components/schemas/Scope'
        status:
          $ref: '#/components/schemas/Status'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
          nullable: true
      description: |
        Suppression record. Schema fields hidden by the view:
        `account_id`, `bounce_category`, `dsn_code`, `meta`.
    OffsetMeta:
      type: object
      required:
        - page_number
        - page_size
        - total_pages
        - total_results
      properties:
        page_number:
          type: integer
        page_size:
          type: integer
        total_pages:
          type: integer
        total_results:
          type: integer
    CursorMeta:
      type: object
      required:
        - page_size
        - has_next
        - has_previous
      properties:
        page_size:
          type: integer
        next_cursor:
          type: string
          description: Omitted when `has_next` is false.
        previous_cursor:
          type: string
          description: Omitted when `has_previous` is false.
        has_next:
          type: boolean
        has_previous:
          type: boolean
    ErrorList:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/BlocksErrorObject'
    Source:
      type: string
      enum:
        - feedback
        - manual
        - import
        - system
    Scope:
      type: string
      enum:
        - account
        - domain
        - address
      description: >-
        Derived server-side from `domain_id`/`from`; never trusted from the
        caller.
    Status:
      type: string
      enum:
        - active
        - expired
        - removed
    BlocksErrorObject:
      type: object
      required:
        - code
        - title
        - detail
      properties:
        code:
          type: string
          description: |
            Error codes: `10001` (Not Found), `10007` (Unauthorized),
            `10015` (Validation Failed), `10019` (Internal — import create
            fallback), `40901` (Conflict), `500` (framework/catch-all).
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              type: string
          description: >-
            `/data/attributes/<field>` for changeset/Params; `/<field>` for
            query-param errors.
  responses:
    ValidationErrorQuery:
      description: Query-param validation error (`source.pointer /<field>`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '10015'
                title: Validation Failed
                detail: is invalid
                source:
                  pointer: /filter[reason]
    Unauthorized:
      description: Missing or invalid gateway auth.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '10007'
                title: Unauthorized
                detail: Missing authentication
    FrameworkError:
      description: |
        Framework-rendered error (e.g. 406 Not Acceptable, 405 Method Not
        Allowed, 415 Unsupported Media Type). HTTP status matches the error
        and the body `code` carries that same status (e.g. `"406"`, not a
        hardcoded `"500"`). The explicit `500.json` clause still emits
        `code: "500"` for genuine 500s.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '406'
                title: Not Acceptable
                detail: Not Acceptable
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Telnyx API key supplied as `Authorization: Bearer <token>`. In
        production, auth may be validated by the API gateway and forwarded via
        Telnyx auth headers.

````