> ## 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 IP pool

> Delete the pool. Member IPs are kept but leave the pool, so they carry no mail until added to another pool. Deleting a pool changes routing for subsequently resolved messages. It does not reroute messages already assigned to the deleted pool. Deleting a pool that still has IPs requires `force=true` and `drain=true`.



## OpenAPI

````yaml /openapi/source/external/email/email.json delete /email/ip_pools/{id}
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.
  - name: Dedicated IPs
    description: >-
      Purchase and manage dedicated sending IP addresses for your Telnyx email
      traffic.
  - name: IP Pools
    description: Group dedicated IPs into pools for sending.
paths:
  /email/ip_pools/{id}:
    delete:
      tags:
        - IP Pools
      summary: Delete an IP pool
      description: >-
        Delete the pool. Member IPs are kept but leave the pool, so they carry
        no mail until added to another pool. Deleting a pool changes routing for
        subsequently resolved messages. It does not reroute messages already
        assigned to the deleted pool. Deleting a pool that still has IPs
        requires `force=true` and `drain=true`.
      operationId: deleteIpPool
      parameters:
        - name: id
          in: path
          required: true
          description: The IP pool identifier (UUID).
          schema:
            type: string
            format: uuid
        - name: force
          in: query
          required: false
          description: >-
            Set together with `drain=true` to delete a pool that still has IPs.
            Either flag alone has no effect.
          schema:
            type: boolean
            default: false
        - name: drain
          in: query
          required: false
          description: >-
            Set together with `force=true` to delete a pool that still has IPs.
            Acknowledges deletion while the pool still has members; this flag
            does not reroute already queued messages.
          schema:
            type: boolean
            default: false
      responses:
        '204':
          description: Pool deleted. No response body.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                errors:
                  - code: '10001'
                    title: Not Found
                    detail: The requested ip pool was not found
        '409':
          description: The pool still has IPs and `force`/`drain` were not both set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                errors:
                  - code: '40901'
                    title: Conflict
                    detail: >-
                      pool still has 2 member IP(s) — remove them first or pass
                      force: true with drain: true
        '422':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      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.email.ipPools.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.ip_pools.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.Email.IPPools.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.email().ipPools().delete("id");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            response = telnyx.email.ip_pools.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->email->ipPools->delete(
                'id',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx email:ip-pools delete \
              --api-key 'My API Key' \
              --id id
components:
  schemas:
    ErrorEnvelope:
      type: object
      description: Telnyx v2 error envelope.
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
                  parameter:
                    type: string
      required:
        - errors
  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.

````