This is the API V2 documentation. To switch out of beta revert back to our API V1.

Open SidemenuAPI Reference
API Reference
Close Sidemenu

IPs

Get all IPsIPsGet

get https://api.telnyx.com/v2/ips

Get all IPs belonging to the user that match the given filters.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/ips?page[number]=1&page[size]=20"
Parameters
In query
page[number]
integer (1)
optional

The page number to load

Default: 1
page[size]
integer (1 - 250)
optional

The size of the page

Default: 20
filter[connection_id]
string
optional

ID of the IPConnection to which this IP should be attached.

filter[ip_address]
string
optional

IP adddress represented by this resource.

Example: "192.168.0.0"
filter[port]
integer
optional

Port to use when connecting to this IP.

Example: 5060
Responses
200

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": [
    {
      "connection_id": "3456789987654",
      "created_at": "2018-02-02T22:25:27.521Z",
      "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      "ip_address": "192.168.0.0",
      "port": 5060,
      "record_type": "ip",
      "updated_at": "2018-02-02T22:25:27.521Z"
    }
  ]
}

Create an IPaddIP

post https://api.telnyx.com/v2/ips

Create a new IP object.

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"connection_id": "UUID", "ip_address": "192.168.0.0"}' \
  https://api.telnyx.com/v2/ips
Parameters
In body
ip_address
string
required

IP adddress represented by this resource.

Example: "192.168.0.0"
connection_id
string
optional

ID of the IPConnection to which this IP should be attached.

port
integer
optional

Port to use when connecting to this IP.

Default: 5060
Example: 5060
Responses
201

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": {
    "connection_id": "3456789987654",
    "created_at": "2018-02-02T22:25:27.521Z",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "ip_address": "192.168.0.0",
    "port": 5060,
    "record_type": "ip",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Retrieve an IPgetIPDetails

get https://api.telnyx.com/v2/ips/{id}

Return the details regarding a specific IP.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/ips/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Parameters
In path
id
string (uuid)
required

Identifies the type of resource.

Example: "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Responses
200

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": {
    "connection_id": "3456789987654",
    "created_at": "2018-02-02T22:25:27.521Z",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "ip_address": "192.168.0.0",
    "port": 5060,
    "record_type": "ip",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Update IPupdateIP

patch https://api.telnyx.com/v2/ips/{id}

Update the details of a specific IP.

curl -X PATCH \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"connection_id": "UUID"}' \
  https://api.telnyx.com/v2/ips/6a09cdc3-8948-47f0-aa62-74ac943d6c58
Parameters
In path
id
string (uuid)
required

Identifies the type of resource.

Example: "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
In body
ip_address
string
required

IP adddress represented by this resource.

Example: "192.168.0.0"
connection_id
string
optional

ID of the IPConnection to which this IP should be attached.

port
integer
optional

Port to use when connecting to this IP.

Default: 5060
Example: 5060
Responses
200

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": {
    "connection_id": "3456789987654",
    "created_at": "2018-02-02T22:25:27.521Z",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "ip_address": "192.168.0.0",
    "port": 5060,
    "record_type": "ip",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Delete an IPdeleteIP

delete https://api.telnyx.com/v2/ips/{id}

Delete an IP.

curl -X DELETE \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  "https://api.telnyx.com/v2/ips/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Parameters
In path
id
string (uuid)
required

Identifies the type of resource.

Example: "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Responses
200

Successful response

400

Bad request

401

Unauthorized

Success Response
{
  "data": {
    "connection_id": "3456789987654",
    "created_at": "2018-02-02T22:25:27.521Z",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "ip_address": "192.168.0.0",
    "port": 5060,
    "record_type": "ip",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}
Previous: IP Connections

Was this section helpful?was-this-page-helpful