> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invoca.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Destinations

export const MethodTag = ({method = "GET", path, label, colors = {}}) => {
  const presets = {
    get: {
      label: "GET",
      light: {
        bg: "#DCFCE7",
        text: "#15803D"
      },
      dark: {
        bg: "rgba(34,197,94,0.16)",
        text: "#4ADE80"
      }
    },
    post: {
      label: "POST",
      light: {
        bg: "#DBEAFE",
        text: "#1D4ED8"
      },
      dark: {
        bg: "rgba(59,130,246,0.16)",
        text: "#60A5FA"
      }
    },
    put: {
      label: "PUT",
      light: {
        bg: "#FEF3C7",
        text: "#B45309"
      },
      dark: {
        bg: "rgba(245,158,11,0.16)",
        text: "#FBBF24"
      }
    },
    patch: {
      label: "PATCH",
      light: {
        bg: "#F3E8FF",
        text: "#7E22CE"
      },
      dark: {
        bg: "rgba(168,85,247,0.16)",
        text: "#C084FC"
      }
    },
    delete: {
      label: "DEL",
      light: {
        bg: "#FEE2E2",
        text: "#B91C1C"
      },
      dark: {
        bg: "rgba(239,68,68,0.16)",
        text: "#F87171"
      }
    }
  };
  const fallback = {
    label: String(method).toUpperCase(),
    light: {
      bg: "#F3F4F6",
      text: "#374151"
    },
    dark: {
      bg: "rgba(156,163,175,0.16)",
      text: "#D1D5DB"
    }
  };
  const preset = presets[String(method).toLowerCase()] || fallback;
  const light = {
    ...preset.light,
    ...colors.light || ({})
  };
  const dark = {
    ...preset.dark,
    ...colors.dark || ({})
  };
  const css = `
    .invoca-method-tag {
      display: inline-block;
      padding: 1px 8px;
      margin-right: 8px;
      border-radius: 8px;
      font-size: 10px;
      line-height: 18px;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      vertical-align: middle;
      background: var(--imt-bg);
      color: var(--imt-fg);
    }
    .invoca-method-path {
      font-size: 13px;
    }
    [data-component-part="accordion-icon"]:has(.invoca-method-tag) {
      width: auto;
      height: auto;
      flex-shrink: 0;
    }
    [data-component-part="accordion-icon"] .invoca-method-tag {
      margin-right: 0;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) {
      flex-wrap: wrap;
      row-gap: 6px;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-icon"] {
      flex: 1 1 0;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-title-container"] {
      flex: 0 0 calc(100% - 8px);
      padding-left: 20px;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-title"] {
      font-size: 12px;
    }
    .dark .invoca-method-tag,
    [data-theme="dark"] .invoca-method-tag {
      background: var(--imt-bg-dark);
      color: var(--imt-fg-dark);
    }
  `;
  const vars = {
    "--imt-bg": light.bg,
    "--imt-fg": light.text,
    "--imt-bg-dark": dark.bg,
    "--imt-fg-dark": dark.text
  };
  return <span>
      <style>{css}</style>
      <span className="invoca-method-tag" style={vars}>
        {label || preset.label}
      </span>
      {path ? <code className="invoca-method-path">{path}</code> : null}
    </span>;
};

## Manage destinations (aka Customer Phone Numbers)

Destinations are alternate way of managing [RingPools](/en/2026-02-01/api_documentation/network_integration/ringpools/index).

[Learn more about RingPools here](https://community.invoca.com/t5/call-attribution/basic-knowledge-ringpools/ta-p/530).

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Property</p></th><th className="head"><p>Type</p></th><th className="head"><p>Value</p></th></tr></thead><tbody><tr className="row-even"><td><p>id</p></td><td><p>integer (read-only)</p></td><td><p>The internal Invoca id of the Destination.</p></td></tr><tr className="row-odd"><td><p>country\_code</p></td><td><p>string</p></td><td><p>Country code of the phone number.</p></td></tr><tr className="row-even"><td><p>phone\_number</p></td><td><p>string</p></td><td><p>Phone number of the Destination.</p></td></tr><tr className="row-odd"><td><p>primary\_url</p></td><td><p>string</p></td><td><p>Website or page URL on which the destination is applied.</p></td></tr><tr className="row-even"><td><p>requested\_destination\_name</p></td><td><p>string (read-only)</p></td><td><p>Alias for the destination. Auto-generated names.</p></td></tr><tr className="row-odd"><td><p><strong>advertiser\_campaign</strong></p></td><td /><td /></tr><tr className="row-even"><td><p>id\_from\_network</p></td><td><p>string</p></td><td><p>The network object\_id for this Advertiser Campaign. Unique within network. Not required when auto-generation is enabled at network level.</p></td></tr><tr className="row-odd"><td><p>name</p></td><td><p>string</p></td><td><p>Campaign name.</p></td></tr><tr className="row-even"><td><p>status</p></td><td><p>string</p></td><td><p>Current campaign state.</p></td></tr><tr className="row-odd"><td><p><strong>dynamic\_number\_pool</strong></p></td><td /><td /></tr><tr className="row-even"><td><p>id</p></td><td><p>integer (read-only)</p></td><td><p>The internal Invoca id of the RingPool.</p></td></tr><tr className="row-odd"><td><p>id\_from\_network</p></td><td><p>string (required)</p></td><td><p>Network specific id of the RingPool. Unique within network. Not required when auto-generation is enabled at network level.</p></td></tr><tr className="row-even"><td><p>name</p></td><td><p>string</p></td><td><p>Arbitrary string. Names the RingPool.</p></td></tr><tr className="row-odd"><td><p>object\_url</p></td><td><p>string (read-only)</p></td><td><p>URL for reaching the RingPool in the UI.</p></td></tr><tr className="row-even"><td><p>lifetime\_seconds</p></td><td><p>integer</p></td><td><p>The guaranteed minimum time that the number will be allocated for this RingPool.</p></td></tr><tr className="row-odd"><td><p>max\_pool\_size</p></td><td><p>integer</p></td><td><p>The maximum amount of phone numbers to be allotted at one time.</p></td></tr><tr className="row-even"><td><p>preferred</p></td><td><p>boolean</p></td><td><p>true or false. Selects this RingPool if the advertiser has multiple RingPools for the campaign and the web integration code does not specify which pool to use.</p></td></tr><tr className="row-odd"><td><p>destination\_phone\_number</p></td><td><p>A phone number to be associated with the RingPool.</p></td><td><p>When using Destinations UI or the forward to destination IVR node, this number will be used.</p></td></tr><tr className="row-even"><td><p>fill\_immediately</p></td><td><p>boolean</p></td><td><p>When true, the ringpool will immediately be filled with phone numbers up to the max\_pool\_size, if numbers are available. When false, the pool will initially fill at 10% capacity to conserve phone number usage. The ringpool will increase phone numbers based on ringpool autoscaling settings and traffic volume.</p></td></tr></tbody></table>

Endpoint:

`https://invoca.net/api/2022-08-01/<network_id>/customer_phone_numbers.json`

<AccordionGroup>
  <Accordion title="Get all Destinations" icon={<MethodTag method="get" path="/customer_phone_numbers"/>}>
    Possible options that can be provided in the API request.

    <table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Property</p></th><th className="head"><p>Type</p></th><th className="head"><p>Value</p></th></tr></thead><tbody><tr className="row-even"><td><p>limit</p></td><td><p>integer (optional) (Default 100)</p></td><td><p>Number of objects to be returned in a single request. If not provided, first 100 objects will be returned.</p></td></tr><tr className="row-odd"><td><p>start</p></td><td><p>integer (optional) (Default 0)</p></td><td><p>First <code>x</code> number of objects to skip in the response. If not provided, the response will start from the first available object.</p></td></tr><tr className="row-even"><td><p>query</p></td><td><p>string (optional)</p></td><td><p>Search string to search by phone number.</p><p>If not provided, all objects will be returned given no other filters are included.</p></td></tr><tr className="row-odd"><td><p>status</p></td><td><p>string (optional)</p></td><td><p>To filter results by a specific type.</p><p>If not provided, all objects will be returned given no other filters are included.</p><p>Possible values include:</p><ul className="simple"><li><p><strong>ignored</strong>: Fetches only destinations that were ignored.</p></li><li><p><strong>tracked</strong>: Fetches only destinations that have a ringpool associated with them.</p></li><li><p><strong>discovered</strong>: Fetches only destinations that were neither ignored nor have a ringpool associated with them.</p></li></ul></td></tr><tr className="row-even"><td><p>sort\_by</p></td><td><p>string (optional) (Default id)</p></td><td><p>Sort the result by a specific column.</p></td></tr><tr className="row-odd"><td><p>sort\_dir</p></td><td><p>string (optional) (Default asc)</p></td><td><p>Sorting direction for the objects being returned. Possible values include <code>asc</code> and <code>desc</code>.</p></td></tr></tbody></table>

    Examples

    Read all Destinations as an array.

    Endpoint:

    `https://invoca.net/api/2022-08-01/<network_id>/customer_phone_numbers.json`

    Response Code: 200

    Response Body:

    ```json theme={null}
    {
      "data": [
        {
          "id": "value",
          "country_code": "1",
          "phone_number": "202-555-0001",
          "primary_url": "",
          "requested_destination_name": "",
          "acknowledged_at": null,
          "created_at": "2023-10-19 03:34:42 -0700",
          "updated_at": "2023-10-19 03:34:42 -0700",
          "advertiser_campaign": {
            "id_from_network": "83",
            "name": "My test campaign 1 - New York",
            "status": "Activated"
          },
          "dynamic_number_pool": {
            "id_from_network": "13",
            "name": "tag 1.83",
            "pool_type": "Custom",
            "destination_type": "Advertiser",
            "lifetime_seconds": 300,
            "max_pool_size": 2,
            "preferred": false,
            "is_first_preference": true,
            "use_custom_data": true
          },
          "ignored_at": null,
          "notified_at": null
        },
        {
          "id": "value",
          "country_code": "1",
          "phone_number": "202-555-0002",
          "primary_url": "",
          "requested_destination_name": "",
          "acknowledged_at": null,
          "created_at": "2023-10-19 03:49:21 -0700",
          "updated_at": "2023-10-19 03:54:56 -0700",
          "advertiser_campaign": {
            "id_from_network": "87",
            "name": "Live campaign New Jersey",
            "status": "Activated"
          },
          "dynamic_number_pool": {
            "id_from_network": null,
            "name": null,
            "pool_type": null,
            "destination_type": null,
            "lifetime_seconds": null,
            "max_pool_size": null,
            "preferred": null,
            "is_first_preference": null,
            "use_custom_data": null
          },
          "ignored_at": null,
          "notified_at": null
        }
      ],
      "requestId": null,
      "recordsTotal": 2
    }
    ```
  </Accordion>

  <Accordion title="Get a Destination" icon={<MethodTag method="get" path="/customer_phone_numbers/<customer_phone_number_id>"/>}>
    #### Examples

    Read a Destination

    Endpoint:

    `https://invoca.net/api/2022-08-01/<network_id>/customer_phone_numbers/<customer_phone_number_id>.json`

    Response Code: 200

    Response Body:

    ```json theme={null}
    {
      "id": "value",
      "country_code": "1",
      "phone_number": "202-555-0001",
      "primary_url": "",
      "requested_destination_name": "",
      "acknowledged_at": null,
      "created_at": "2023-10-19 03:49:21 -0700",
      "updated_at": "2023-10-19 03:54:56 -0700",
      "advertiser_campaign": {
          "id_from_network": "87",
          "name": "test-campaign Arizona",
          "status": "Activated"
      },
      "dynamic_number_pool": {
        "id_from_network": "13",
        "name": "tag 12.83",
        "pool_type": "Custom",
        "destination_type": "Advertiser",
        "lifetime_seconds": 300,
        "max_pool_size": 2,
        "preferred": false,
        "is_first_preference": true,
        "use_custom_data": true
      },
      "ignored_at": null,
      "notified_at": null
    }
    ```
  </Accordion>

  <Accordion title="Delete a Destination" icon={<MethodTag method="delete" path="/customer_phone_numbers/<customer_phone_number_id>"/>}>
    #### Examples

    Delete a Destination

    Endpoint:

    `https://invoca.net/api/2022-08-01/<network_id>/customer_phone_numbers/<customer_phone_number_id>.json`

    Response Code: 200

    Response Body:

    ```json theme={null}
    {}
    ```
  </Accordion>
</AccordionGroup>

**NOTE: Creating & Deleting Destinations**\
Creating a Destination via this endpoint isn't possible. A Destination can be made alongside a RingPool that it'll be associated with via the RingPool endpoint ([**Documentation**](https://developers.invoca.net/en/latest/api_documentation/network_integration/ringpools/index.html)).

The Destination can be deleted via this endpoint, but if the associated RingPool is going to be deleted as well, you can save a request by utilizing the delete\_detected\_phone\_number parameter in the RingPool endpoint.
