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
Path Parameters
Query Parameters
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>"
}
}
]
}