> ## 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.

# Delete an unsubscribe group

> If the group has 0 active suppressions, hard-deletes the row. With
`force=true`, soft-deletes all active suppressions first (status →
`removed`, `group_id` cleared, `removed` audit event per block) in a
single transaction, then hard-deletes the group. Without `force`
and active suppressions present → `409`. Audit trail is preserved.
`force` only accepts the string `"true"` or boolean `true`; all other
values are false.




## OpenAPI

````yaml /openapi/generated/email/unsubscribe-groups.yml delete /email_unsubscribe_groups/{id}
openapi: 3.1.0
info:
  contact:
    email: support@telnyx.com
  description: API for managing unsubscribe groups and suppressions.
  title: Telnyx Email Unsubscribe Groups API
  version: 2.0.0
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /email_unsubscribe_groups/{id}:
    parameters:
      - $ref: '#/components/parameters/PathId'
    delete:
      tags:
        - Email Unsubscribe Groups
      summary: Delete an unsubscribe group
      description: |
        If the group has 0 active suppressions, hard-deletes the row. With
        `force=true`, soft-deletes all active suppressions first (status →
        `removed`, `group_id` cleared, `removed` audit event per block) in a
        single transaction, then hard-deletes the group. Without `force`
        and active suppressions present → `409`. Audit trail is preserved.
        `force` only accepts the string `"true"` or boolean `true`; all other
        values are false.
      operationId: deleteUnsubscribeGroup
      parameters:
        - $ref: '#/components/parameters/ForceQuery'
      responses:
        '204':
          description: Deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/BlocksNotFound'
        '406':
          $ref: '#/components/responses/FrameworkError'
        '409':
          description: Group has active suppressions and `force` is false.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorList'
              example:
                errors:
                  - code: '40901'
                    title: Conflict
                    detail: >-
                      Group has 3 active suppression(s). Remove them first or
                      use ?force=true.
        '422':
          $ref: '#/components/responses/ChangesetError'
      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
            });

            await client.emailUnsubscribeGroups.delete('id');
        - 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
            )
            client.email_unsubscribe_groups.delete(
                "id",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\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\terr := client.EmailUnsubscribeGroups.Delete(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\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();

                    client.emailUnsubscribeGroups().delete("id");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            response = telnyx.email_unsubscribe_groups.delete("id")

            puts(response)
        - 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 {
              $response = $client->emailUnsubscribeGroups->delete(
                'id',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx email-unsubscribe-groups delete \
              --api-key 'My API Key' \
              --id id
components:
  parameters:
    PathId:
      name: id
      in: path
      required: true
      description: Resource UUID. Malformed UUIDs are treated as not-found (not 400).
      schema:
        type: string
        format: uuid
    ForceQuery:
      name: force
      in: query
      description: >-
        Force-delete a group with active suppressions. Only `"true"` (string) or
        `true` (bool) are truthy; all other values are false.
      schema:
        oneOf:
          - type: string
            enum:
              - 'true'
              - 'false'
          - type: boolean
  responses:
    Unauthorized:
      description: Missing or invalid gateway auth.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '10007'
                title: Unauthorized
                detail: Missing authentication
    BlocksNotFound:
      description: >-
        Resource not found (cross-account lookups and malformed UUIDs also
        return 404 — no leak).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '10001'
                title: Not Found
                detail: The requested email block was not found
    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
    ChangesetError:
      description: >-
        Validation error (changeset or internal `Params`). One error object per
        field, `source.pointer /data/attributes/<field>`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '10015'
                title: Validation Failed
                detail: can't be blank
                source:
                  pointer: /data/attributes/to
  schemas:
    ErrorList:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/BlocksErrorObject'
    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.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````