IPs API

IP operations API

List Ips

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

SecuritybearerAuth
Request
query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

filter[connection_id]
string

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

filter[ip_address]
string

IP adddress represented by this resource.

Example: filter[ip_address]=192.168.0.0
filter[port]
integer

Port to use when connecting to this IP.

Example: filter[port]=5060
Responses
200

Successful response with a list of IPs.

Response Schema: application/json
Array of objects (Ip)
Array
connection_id
string

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

created_at
string

ISO 8601 formatted date indicating when the resource was created.

id
string <int64>

Identifies the type of resource.

ip_address
string

IP adddress represented by this resource.

port
integer
Default: 5060

Port to use when connecting to this IP.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date indicating when the resource was updated.

400

Bad request

401

Unauthorized

get/ips
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.IP.list(page={"number":1,"size":20})
Response samples
application/json
{
  • "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 Ip

Create a new IP object.

SecuritybearerAuth
Request
Request Body schema: application/json
connection_id
string

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

ip_address
required
string

IP adddress represented by this resource.

port
integer
Default: 5060

Port to use when connecting to this IP.

Responses
201

Successful response with details about an IP.

Response Schema: application/json
object (Ip)
connection_id
string

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

created_at
string

ISO 8601 formatted date indicating when the resource was created.

id
string <int64>

Identifies the type of resource.

ip_address
string

IP adddress represented by this resource.

port
integer
Default: 5060

Port to use when connecting to this IP.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date indicating when the resource was updated.

400

Bad request

401

Unauthorized

post/ips
Request samples
application/json
{
  • "connection_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
  • "ip_address": "192.168.0.0",
  • "port": 5060
}
Response samples
application/json
{
  • "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 Ip

Delete an IP.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the type of resource.

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

Successful response with details about an IP.

Response Schema: application/json
object (Ip)
connection_id
string

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

created_at
string

ISO 8601 formatted date indicating when the resource was created.

id
string <int64>

Identifies the type of resource.

ip_address
string

IP adddress represented by this resource.

port
integer
Default: 5060

Port to use when connecting to this IP.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date indicating when the resource was updated.

400

Bad request

401

Unauthorized

delete/ips/{id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

res = telnyx.IP.retrieve("id")
res.delete()
Response samples
application/json
{
  • "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 Ip

Return the details regarding a specific IP.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the type of resource.

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

Successful response with details about an IP.

Response Schema: application/json
object (Ip)
connection_id
string

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

created_at
string

ISO 8601 formatted date indicating when the resource was created.

id
string <int64>

Identifies the type of resource.

ip_address
string

IP adddress represented by this resource.

port
integer
Default: 5060

Port to use when connecting to this IP.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date indicating when the resource was updated.

400

Bad request

401

Unauthorized

get/ips/{id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.IP.retrieve("id")
Response samples
application/json
{
  • "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 an Ip

Update the details of a specific IP.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the type of resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
Request Body schema: application/json
connection_id
string

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

ip_address
required
string

IP adddress represented by this resource.

port
integer
Default: 5060

Port to use when connecting to this IP.

Responses
200

Successful response with details about an IP.

Response Schema: application/json
object (Ip)
connection_id
string

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

created_at
string

ISO 8601 formatted date indicating when the resource was created.

id
string <int64>

Identifies the type of resource.

ip_address
string

IP adddress represented by this resource.

port
integer
Default: 5060

Port to use when connecting to this IP.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date indicating when the resource was updated.

400

Bad request

401

Unauthorized

patch/ips/{id}
Request samples
application/json
{
  • "connection_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
  • "ip_address": "192.168.0.0",
  • "port": 5060
}
Response samples
application/json
{
  • "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"
    }
}