groundmail-dev Suppressions API

Account-level recipient suppressions (bounce/complaint/manual)

Operations 4

GET /suppressions List suppressions or category opt-outs #
POST /suppressions Add an email to the suppression list #
DELETE /suppressions Remove a suppression or category opt-out by email query parameter #
DELETE /suppressions/{id} Remove a suppression by id or address #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/groundmail-dev:groundmail-dev-suppressions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

groundmail-dev-suppressions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Groundmail Suppressions API
  version: 0.16.0
  description: 'Transactional email API for developers.

    Auth: `Authorization: Bearer gm_…` with an API key, or `Bearer gm_oat_…` with an OAuth

    access token from the device flow (`groundmail login`). Dashboard session cookies work

    for integrations.


    Azure managed identity (keyless): an Azure workload can send a Microsoft Entra access

    token (a JWT) as the Bearer credential instead of a key. Register the identity''s tenant

    ID, object ID and token audience in the dashboard (API keys → Azure managed identity);

    it then has the same access options as an API key (scopes, domain limit, tenant).

    App-only tokens only. Any authentication failure is the same 401 `unauthorized`.

    See https://docs.groundmail.dev/authentication/azure-managed-identity.


    Test mode: a test key (`gm_test_…`, `POST /api-keys` with `test: true`) behaves

    like a live key, but its sends are never delivered: they are stored with

    `test: true`, get simulated events and webhooks (`data.test: true`), and do not

    count toward plan limits, the sending ramp, stats or billing. Simulator

    addresses (`delivered@`, `bounce@`, `block@`, `complaint@`, `suppressed@`,

    `delayed@simulator.groundmail.dev`, plus addressing allowed) produce one outcome

    each with any key. See https://docs.groundmail.dev/testing.


    Tenants: a platform that sends email for its own customers creates one tenant per

    customer (`/tenants`), each with its own domains, suppression list, stats, sending

    ramp and pause switch. Name the tenant with `tenant` on sends, domains and

    suppressions, or send from a domain the tenant owns. API keys and webhook

    endpoints can be limited to tenants. Included on pay as you go and the Dedicated plan;

    elsewhere a request that names a tenant gets 403 `tenants_not_enabled`. See

    https://docs.groundmail.dev/tenants.


    Data retention: sent emails (content and events) and received emails are kept for

    your plan''s window, then deleted: 7 days on Free, 30 on Pro, 90 on Scale, up to 365

    on Dedicated. Past it, `GET /emails/{id}` and `GET /received-emails/{id}` return

    404 `not_found` and lists no longer include them. Aggregate stats

    (`GET /deliverability`) are kept. Store webhook events to keep history longer. See

    https://docs.groundmail.dev/emails#data-retention.


    Scopes: every credential carries scopes (`full`, `emails:send`, `emails:read`,

    `domains:read`, `domains:write`, `webhooks:write`, `templates:write`,

    `suppressions:write`, `account:read`). Each operation lists the scope it needs under

    `x-required-scope` (space-separated: all of them; `a | b`: either); a credential

    without it gets 403 `insufficient_scope` with `required_scope`. `full` grants everything; `domains:write` includes `domains:read`.

    Legacy `sending` API keys have `emails:send` + `emails:read`.

    Production base URL: https://api.groundmail.dev'
servers:
- url: https://api.groundmail.dev
  description: Production
tags:
- name: Suppressions
  description: Account-level recipient suppressions (bounce/complaint/manual)
paths:
  /suppressions:
    get:
      operationId: listSuppressions
      x-required-scope: suppressions:write
      summary: List suppressions or category opt-outs
      tags:
      - Suppressions
      security:
      - bearerAuth: []
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
      - name: cursor
        in: query
        schema:
          type: string
      - name: email
        in: query
        schema:
          type: string
          format: email
        description: Filter by normalized email address
      - name: tenant
        in: query
        schema:
          type: string
        description: List this tenant's own suppression list (its `external_id` or `id`) instead of the account-wide list. A key limited to one tenant always sees its tenant's list.
      - name: type
        in: query
        schema:
          type: string
          enum:
          - suppression
          - category_opt_out
          default: suppression
        description: '`category_opt_out` works on category opt-outs (a reader''s one-click unsubscribe from product or newsletter email) instead of the suppression list.

          '
      - name: category
        in: query
        schema:
          type: string
          enum:
          - product
          - newsletter
        description: With `type=category_opt_out`, only opt-outs from this category.
      - name: include_tenants
        in: query
        schema:
          type: boolean
          default: false
        description: 'With `type=category_opt_out` and no `tenant`, also list every tenant''s opt-outs (each entry names its tenant). Ignored for a key limited to one tenant.

          '
      responses:
        '200':
          description: 'Suppression list, or category opt-outs with `type=category_opt_out` (`ListCategoryOptOutsResponse`).

            '
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ListSuppressionsResponse'
                - $ref: '#/components/schemas/ListCategoryOptOutsResponse'
        '400':
          description: Invalid `type`, `category` or cursor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createSuppression
      x-required-scope: suppressions:write
      summary: Add an email to the suppression list
      tags:
      - Suppressions
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSuppressionRequest'
      responses:
        '200':
          description: Suppression created or updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuppressionResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: deleteSuppressionByEmail
      x-required-scope: suppressions:write
      summary: Remove a suppression or category opt-out by email query parameter
      tags:
      - Suppressions
      security:
      - bearerAuth: []
      parameters:
      - name: email
        in: query
        required: true
        schema:
          type: string
          format: email
      - name: tenant
        in: query
        schema:
          type: string
        description: Remove it from this tenant's list instead of the account-wide list.
      - name: type
        in: query
        schema:
          type: string
          enum:
          - suppression
          - category_opt_out
          default: suppression
        description: '`category_opt_out` works on category opt-outs (a reader''s one-click unsubscribe from product or newsletter email) instead of the suppression list.

          '
      - name: category
        in: query
        schema:
          type: string
          enum:
          - product
          - newsletter
        description: With `type=category_opt_out`, remove only this category. Omit to remove every category for the address.
      responses:
        '200':
          description: Suppression (or category opt-out) removed
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                properties:
                  ok:
                    type: boolean
                  deleted:
                    type: integer
                    description: With `type=category_opt_out`, how many opt-outs were removed.
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Suppression not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /suppressions/{id}:
    delete:
      operationId: deleteSuppression
      x-required-scope: suppressions:write
      summary: Remove a suppression by id or address
      description: '`{id}` is the suppression `id`, or the suppressed address itself

        (`DELETE /suppressions/user@example.com`, URL-encoded if your client requires it).

        With `type=category_opt_out`, `{id}` is a category opt-out id or the address.

        Returns `404` when nothing matches.'
      tags:
      - Suppressions
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Suppression id (or category opt-out id with `type=category_opt_out`), or the email address
        schema:
          type: string
      - name: tenant
        in: query
        schema:
          type: string
        description: Remove it from this tenant's list instead of the account-wide list.
      - name: type
        in: query
        schema:
          type: string
          enum:
          - suppression
          - category_opt_out
          default: suppression
        description: '`category_opt_out` works on category opt-outs (a reader''s one-click unsubscribe from product or newsletter email) instead of the suppression list.

          '
      - name: category
        in: query
        schema:
          type: string
          enum:
          - product
          - newsletter
        description: With `type=category_opt_out`, remove only this category. Omit to remove every category for the address.
      responses:
        '200':
          description: Suppression (or category opt-out) removed
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                properties:
                  ok:
                    type: boolean
                  deleted:
                    type: integer
                    description: With `type=category_opt_out`, how many opt-outs were removed.
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Suppression not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CategoryOptOut:
      type: object
      description: 'A reader''s one-click unsubscribe from one category of email. Sends in that category to the address are refused with 422 (`details.category_unsubscribed`) until it is removed.

        '
      required:
      - id
      - type
      - email
      - category
      - tenant
      - created_at
      - updated_at
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
          - category_opt_out
        email:
          type: string
          format: email
        category:
          type: string
          enum:
          - product
          - newsletter
        tenant:
          type: string
          nullable: true
          description: External id of the tenant whose email the reader left; `null` when account-wide.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ListCategoryOptOutsResponse:
      type: object
      required:
      - data
      - has_more
      - next_cursor
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CategoryOptOut'
        has_more:
          type: boolean
        next_cursor:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - message
          properties:
            message:
              type: string
              description: What went wrong, in plain English. Wording can change; branch on `code`.
            code:
              $ref: '#/components/schemas/ErrorCode'
            hint:
              type: string
              description: 'How to fix the error. Specific to the failure when known (for example a sandbox recipient), otherwise the default for `code`.

                '
            docs_url:
              type: string
              format: uri
              description: Link to this code on the errors page, `https://docs.groundmail.dev/errors#<code>`.
              example: https://docs.groundmail.dev/errors#validation_error
            upgrade_url:
              type: string
              description: 'Dashboard path to upgrade when code is plan_limit or domain_limit. Absent for `daily_ramp_limit`, which upgrading does not lift.

                '
            required_scope:
              type: string
              description: 'With `insufficient_scope`: the scope (or space-separated scopes) the operation needs. Also sent as `WWW-Authenticate: Bearer error="insufficient_scope", scope="…"`.

                '
            details:
              description: 'Optional structured details. For send blocks this may include `suppressed` (global suppression list) or `category_unsubscribed` plus `category` and `email_id` (category opt-out). A `daily_ramp_limit` carries `stream` (`transactional` or `product`), `daily_limit` (today''s recipient limit for that stream), `used_today`, `recipients` (in this send), `ramp_stage` and `resets_at` (next 00:00 UTC, ISO 8601), plus `tenant` when the tenant''s own limit refused the send.

                '
    SuppressionResponse:
      type: object
      required:
      - suppression
      properties:
        suppression:
          $ref: '#/components/schemas/Suppression'
    ListSuppressionsResponse:
      type: object
      required:
      - data
      - has_more
      - next_cursor
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Suppression'
        has_more:
          type: boolean
        next_cursor:
          type: string
          nullable: true
    Suppression:
      type: object
      required:
      - id
      - email
      - reason
      - source
      - created_at
      - updated_at
      properties:
        id:
          type: string
        email:
          type: string
          format: email
        reason:
          type: string
          nullable: true
        source:
          type: string
          enum:
          - bounce
          - complaint
          - manual
          - api
          - unsubscribe
        tenant:
          type: string
          description: The tenant's `external_id`. Present only on entries of a tenant's list.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    CreateSuppressionRequest:
      type: object
      required:
      - email
      properties:
        email:
          type: string
          format: email
        reason:
          type: string
        tenant:
          type: string
          description: 'Add the address to this tenant''s own list (its `external_id` or `id`) instead of the account-wide list. Sends for other tenants are not affected.

            '
    ErrorCode:
      type: string
      description: 'Stable, machine-readable error code. Each code is documented at

        `https://docs.groundmail.dev/errors#<code>`. New codes may be added;

        existing codes keep their meaning.


        - `validation_error` (400, 422): the request failed validation, or every recipient is suppressed or opted out (422). Fix the field named in `message`/`details`.

        - `unauthorized` (401): missing, malformed or revoked API key. Send `Authorization: Bearer gm_…`.

        - `forbidden` (403): the key is valid but the action is not allowed (unverified `from` domain, sandbox send to someone other than the account email, no payment method on file, sending restricted).

        - `insufficient_scope` (403): the API key''s scope does not cover this endpoint.

        - `domain_not_allowed` (403): the API key is limited to other sending domains than the one in `from`, or `from` is on another tenant''s domain.

        - `tenants_not_enabled` (403): the request names a tenant, but tenants are not enabled for this account. They are included on pay as you go and the Dedicated plan.

        - `newsletter_not_enabled` (403): the send uses `category: "newsletter"`, but newsletter sending isn''t enabled on this account. Newsletter email is accepted only for approved accounts.

        - `not_found` (404): no resource with that id for this team.

        - `conflict` (409): the resource already exists or its state blocks the change.

        - `plan_limit` (429): the plan''s monthly or daily sending limit was reached. See `upgrade_url`.

        - `daily_ramp_limit` (429): the send would go over a new account''s daily ramp-up limit for its stream, or its tenant''s own ramp or daily limit (`details.tenant`). Upgrading does not lift it; wait for `details.resets_at`.

        - `domain_limit` (403): the plan''s domain limit was reached. See `upgrade_url`.

        - `idempotency_conflict` (409): the `Idempotency-Key` was reused with a different body, or the first request is still running.

        - `rate_limited` (429): too many requests. Wait `Retry-After` seconds.

        - `timeout` (408): a long-poll (GET /test-inbox/wait) ended before a matching email arrived. Safe to call again.

        - `upstream_error` (502, 503, 504, or a passed-through 4xx): the mail server did not accept the request. 502/503 are safe to retry with the same `Idempotency-Key`; 504 means the outcome is unknown.

        - `not_configured` (503): the feature is temporarily unavailable.

        - `internal_error` (500): unexpected server error. Retry with backoff.

        '
      enum:
      - validation_error
      - unauthorized
      - forbidden
      - insufficient_scope
      - not_found
      - conflict
      - plan_limit
      - daily_ramp_limit
      - domain_limit
      - idempotency_conflict
      - rate_limited
      - timeout
      - upstream_error
      - not_configured
      - internal_error
      - domain_not_allowed
      - tenants_not_enabled
      - newsletter_not_enabled
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Groundmail API key (`gm_…`), OAuth access token (`gm_oat_…`), or a Microsoft Entra access token from an Azure managed identity registered in the dashboard (keyless; see https://docs.groundmail.dev/authentication/azure-managed-identity). All carry scopes; see the API description.

        '