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

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



## OpenAPI

````yaml /openapi/source/external/email/email.json post /email/ip_pools/{id}/ips
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}/ips:
    post:
      tags:
        - IP Pools
      summary: Add a dedicated IP to a pool
      description: >-
        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`.
      operationId: addIpToPool
      parameters:
        - name: id
          in: path
          required: true
          description: The IP pool identifier (UUID).
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IpPoolAddIpRequest'
            example:
              dedicated_ip_id: 6a7f9a30-1234-4b5c-8d9e-0f1a2b3c4d5e
              weight: 100
      responses:
        '201':
          description: Pool membership created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PoolMembershipResponse'
              example:
                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'
        '400':
          description: Malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: The pool or the dedicated IP was not found in this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                errors:
                  - code: '10001'
                    title: Not Found
                    detail: The requested ip pool was not found
        '422':
          description: >-
            Validation failed: missing `dedicated_ip_id`, invalid `weight`,
            released IP, or IP already in a pool.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                errors:
                  - code: '10015'
                    title: Validation Failed
                    detail: weight must be a positive integer (got 0)
                    source:
                      pointer: /data/attributes/weight
      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
            });

            const PoolMembership = await client.email.ipPools.ips.create('id', {
              dedicated_ip_id: 'dedicated_ip_id',
            });

            console.log(PoolMembership.data);
        - 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
            )
            pool_membership = client.email.ip_pools.ips.create(
                id="id",
                dedicated_ip_id="dedicated_ip_id",
            )
            print(pool_membership.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\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\tiP, err := client.Email.IPPools.Ips.New(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\ttelnyx.EmailIPPoolIPNewParams{\n\t\t\tDedicatedIPID: \"dedicated_ip_id\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", iP.Data)\n}\n"
        - lang: Java
          source: |-
            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);
                }
            }
        - lang: Ruby
          source: >-
            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)
        - 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 {
              $pool_membership = $client->email->ipPools->ips->create(
                'id',
                dedicated_ip_id: 'dedicated_ip_id',
              );

              var_dump($pool_membership);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx email:ip-pools:ips create \
              --api-key 'My API Key' \
              --id id \
              --dedicated-ip-id dedicated_ip_id
components:
  schemas:
    IpPoolAddIpRequest:
      type: object
      required:
        - dedicated_ip_id
      properties:
        dedicated_ip_id:
          type: string
          format: uuid
          description: >-
            The dedicated IP to add. It must belong to the account, must not be
            released, and must not already be in a pool.
        weight:
          type: integer
          description: >-
            Relative routing weight for this IP in the pool. Positive integer;
            defaults to 100.
          minimum: 1
    PoolMembershipResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            pool_id:
              type: string
              format: uuid
            dedicated_ip_id:
              type: string
              format: uuid
            weight:
              type: integer
              minimum: 1
            created_at:
              type: string
              format: date-time
      required:
        - data
    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.

````