Skip to main content

Create an Ip

POST 
/ips

Create a new IP object.

Request

Body

    connection_id string

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

    ip_address stringrequired

    IP adddress represented by this resource.

    port integer

    Default value: 5060

    Port to use when connecting to this IP.

Responses

201: Successful response with details about an IP.

401: Unauthorized

403: The user doesn't have the required permissions to perform the requested action.

422: The request was well-formed but was unable to be followed due to semantic errors.

Request samples


curl -L 'https://api.telnyx.com/v2/ips' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"connection_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"ip_address": "192.168.0.0",
"port": 5060
}'

Response samples


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