Add a dedicated IP to a pool
Add a dedicated IP to the pool with an optional routing weight. An IP can belong to one pool; to move an IP that is already in a pool, use PATCH /email/dedicated_ips/{id} with pool_id.
POST
/
email
/
ip_pools
/
{id}
/
ips
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const PoolMembership = await client.email.ipPools.ips.create('id', {
dedicated_ip_id: 'dedicated_ip_id',
});
console.log(PoolMembership.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
pool_membership = client.email.ip_pools.ips.create(
id="id",
dedicated_ip_id="dedicated_ip_id",
)
print(pool_membership.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
iP, err := client.Email.IPPools.Ips.New(
context.TODO(),
"id",
telnyx.EmailIPPoolIPNewParams{
DedicatedIPID: "dedicated_ip_id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", iP.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.email.ipPools.ips.IpCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
IpCreateParams params = IpCreateParams.builder()
.dedicatedIpId("dedicated_ip_id")
.build();
var response = client.email().ipPools().ips().create("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
pool_membership = telnyx.email.ip_pools.ips.create("id", dedicated_ip_id: "dedicated_ip_id")
puts(pool_membership)<?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 {
$pool_membership = $client->email->ipPools->ips->create(
'id',
dedicated_ip_id: 'dedicated_ip_id',
);
var_dump($pool_membership);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email:ip-pools:ips create \
--api-key 'My API Key' \
--id id \
--dedicated-ip-id dedicated_ip_idcurl --request POST \
--url https://api.telnyx.com/v2/email/ip_pools/{id}/ips \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dedicated_ip_id": "6a7f9a30-1234-4b5c-8d9e-0f1a2b3c4d5e",
"weight": 100
}
'{
"data": {
"pool_id": "9b1c4d70-abcd-4e5f-8a9b-0c1d2e3f4a5b",
"dedicated_ip_id": "6a7f9a30-1234-4b5c-8d9e-0f1a2b3c4d5e",
"weight": 100,
"created_at": "2026-10-14T20:40:00.000000Z"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested ip pool was not found"
}
]
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "weight must be a positive integer (got 0)",
"source": {
"pointer": "/data/attributes/weight"
}
}
]
}Authorizations
Body
application/json
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
});
const PoolMembership = await client.email.ipPools.ips.create('id', {
dedicated_ip_id: 'dedicated_ip_id',
});
console.log(PoolMembership.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
pool_membership = client.email.ip_pools.ips.create(
id="id",
dedicated_ip_id="dedicated_ip_id",
)
print(pool_membership.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
iP, err := client.Email.IPPools.Ips.New(
context.TODO(),
"id",
telnyx.EmailIPPoolIPNewParams{
DedicatedIPID: "dedicated_ip_id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", iP.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.email.ipPools.ips.IpCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
IpCreateParams params = IpCreateParams.builder()
.dedicatedIpId("dedicated_ip_id")
.build();
var response = client.email().ipPools().ips().create("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
pool_membership = telnyx.email.ip_pools.ips.create("id", dedicated_ip_id: "dedicated_ip_id")
puts(pool_membership)<?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 {
$pool_membership = $client->email->ipPools->ips->create(
'id',
dedicated_ip_id: 'dedicated_ip_id',
);
var_dump($pool_membership);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email:ip-pools:ips create \
--api-key 'My API Key' \
--id id \
--dedicated-ip-id dedicated_ip_idcurl --request POST \
--url https://api.telnyx.com/v2/email/ip_pools/{id}/ips \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dedicated_ip_id": "6a7f9a30-1234-4b5c-8d9e-0f1a2b3c4d5e",
"weight": 100
}
'{
"data": {
"pool_id": "9b1c4d70-abcd-4e5f-8a9b-0c1d2e3f4a5b",
"dedicated_ip_id": "6a7f9a30-1234-4b5c-8d9e-0f1a2b3c4d5e",
"weight": 100,
"created_at": "2026-10-14T20:40:00.000000Z"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested ip pool was not found"
}
]
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "weight must be a positive integer (got 0)",
"source": {
"pointer": "/data/attributes/weight"
}
}
]
}