Remove a dedicated IP from a pool
Remove the dedicated IP from the pool. The IP is kept but carries no mail until added to a pool again. Removing the last IP requires force=true and drain=true.
DELETE
/
email
/
ip_pools
/
{id}
/
ips
/
{ip_id}
JavaScript
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.ips.delete('id', 'ip_id');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.ips.delete(
"id",
"ip_id",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Email.IPPools.Ips.Delete(
context.TODO(),
"id",
"ip_id",
)
if err != nil {
panic(err.Error())
}
}
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().ips().delete("id", "ip_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.email.ip_pools.ips.delete("id", "ip_id")
puts(response)<?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->ips->delete(
'id',
'ip_id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email:ip-pools:ips delete \
--api-key 'My API Key' \
--id id \
--ip-id ip_idcurl --request DELETE \
--url https://api.telnyx.com/v2/email/ip_pools/{id}/ips/{ip_id} \
--header 'Authorization: Bearer <token>'{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested pool membership was not found"
}
]
}{
"errors": [
{
"code": "40901",
"title": "Conflict",
"detail": "cannot remove the last IP from a pool without force: true and drain: true (in-flight messages need a routable source)"
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}Authorizations
Telnyx API key supplied as Authorization: Bearer <token>. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.
Path Parameters
The IP pool identifier (UUID).
The dedicated IP identifier (UUID).
Query Parameters
Set together with drain=true to remove the last IP in the pool. Either flag alone has no effect.
Set together with force=true to remove the last IP in the pool. Acknowledges that mail routed to the emptied pool is held until the pool has a sendable IP again.
Response
IP removed from the pool. No response body.
Was this page helpful?
JavaScript
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.ips.delete('id', 'ip_id');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.ips.delete(
"id",
"ip_id",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Email.IPPools.Ips.Delete(
context.TODO(),
"id",
"ip_id",
)
if err != nil {
panic(err.Error())
}
}
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().ips().delete("id", "ip_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.email.ip_pools.ips.delete("id", "ip_id")
puts(response)<?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->ips->delete(
'id',
'ip_id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email:ip-pools:ips delete \
--api-key 'My API Key' \
--id id \
--ip-id ip_idcurl --request DELETE \
--url https://api.telnyx.com/v2/email/ip_pools/{id}/ips/{ip_id} \
--header 'Authorization: Bearer <token>'{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested pool membership was not found"
}
]
}{
"errors": [
{
"code": "40901",
"title": "Conflict",
"detail": "cannot remove the last IP from a pool without force: true and drain: true (in-flight messages need a routable source)"
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}