WireGuard Interfaces

WireGuard Interface operations

List all WireGuard Interfaces

List all WireGuard Interfaces.

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[network_id]
string

The associated network id to filter on.

Example: filter[network_id]=6a09cdc3-8948-47f0-aa62-74ac943d6c58
Responses
200

Successful response

Response Schema: application/json
Array of objects (WireguardInterfaceRead)
object (PaginationMeta)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
get/wireguard_interfaces
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      • "record_type": "wireguard_interface",
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "updated_at": "2018-02-02T22:25:27.521Z",
      • "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      • "name": "test interface",
      • "status": "provisioned",
      • "endpoint": "203.0.113.0:51871",
      • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
      • "region_code": "ashburn-va",
      • "region": {
        • "code": "ashburn-va",
        • "name": "Ashburn",
        • "record_type": "region"
        }
      }
    ],
  • "meta": {
    • "total_pages": 3,
    • "total_results": 55,
    • "page_number": 2,
    • "page_size": 25
    }
}

Create a WireGuard Interface

Create a new WireGuard Interface. Current limitation of 10 interfaces per user can be created.

SecurityBearerAuth
Request
Request Body schema: application/json
required
network_id
required
string <uuid>

The id of the network associated with the interface.

name
string

A user specified name for the interface.

region_code
required
string

The region the interface should be deployed to.

Responses
202

Successful response

Response Schema: application/json
object (WireguardInterfaceRead)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

network_id
string <uuid>

The id of the network associated with the interface.

name
string

A user specified name for the interface.

status
string (InterfaceStatus)

The current status of the interface deployment.

Enum: "created" "provisioning" "provisioned" "deleting"
endpoint
string

The Telnyx WireGuard peers Peer.endpoint value.

public_key
string

The Telnyx WireGuard peers Peer.PublicKey.

region_code
string

The region interface is deployed to.

object
422

Unprocessable entity. Check the 'detail' field in response for details.

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
post/wireguard_interfaces
Request samples
application/json
{
  • "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
  • "name": "test interface",
  • "region_code": "ashburn-va"
}
Response samples
application/json
{
  • "data": {
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "wireguard_interface",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "name": "test interface",
    • "status": "provisioned",
    • "endpoint": "203.0.113.0:51871",
    • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    • "region_code": "ashburn-va",
    • "region": {
      • "code": "ashburn-va",
      • "name": "Ashburn",
      • "record_type": "region"
      }
    }
}

Retrieve a WireGuard Interfaces

Retrieve a WireGuard Interfaces.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

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

Successful response

Response Schema: application/json
object (WireguardInterfaceRead)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

network_id
string <uuid>

The id of the network associated with the interface.

name
string

A user specified name for the interface.

status
string (InterfaceStatus)

The current status of the interface deployment.

Enum: "created" "provisioning" "provisioned" "deleting"
endpoint
string

The Telnyx WireGuard peers Peer.endpoint value.

public_key
string

The Telnyx WireGuard peers Peer.PublicKey.

region_code
string

The region interface is deployed to.

object
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
get/wireguard_interfaces/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "wireguard_interface",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "name": "test interface",
    • "status": "provisioned",
    • "endpoint": "203.0.113.0:51871",
    • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    • "region_code": "ashburn-va",
    • "region": {
      • "code": "ashburn-va",
      • "name": "Ashburn",
      • "record_type": "region"
      }
    }
}

Delete a WireGuard Interface

Delete a WireGuard Interface.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

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

Successful response

Response Schema: application/json
object (WireguardInterfaceRead)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

network_id
string <uuid>

The id of the network associated with the interface.

name
string

A user specified name for the interface.

status
string (InterfaceStatus)

The current status of the interface deployment.

Enum: "created" "provisioning" "provisioned" "deleting"
endpoint
string

The Telnyx WireGuard peers Peer.endpoint value.

public_key
string

The Telnyx WireGuard peers Peer.PublicKey.

region_code
string

The region interface is deployed to.

object
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
delete/wireguard_interfaces/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "wireguard_interface",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "name": "test interface",
    • "status": "provisioned",
    • "endpoint": "203.0.113.0:51871",
    • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    • "region_code": "ashburn-va",
    • "region": {
      • "code": "ashburn-va",
      • "name": "Ashburn",
      • "record_type": "region"
      }
    }
}

List all WireGuard Peers

List all WireGuard peers.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
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[wireguard_interface_id]
string <uuid>

The id of the associated WireGuard interface to filter on.

Example: filter[wireguard_interface_id]=6a09cdc3-8948-47f0-aa62-74ac943d6c58
Responses
200

Successful response

Response Schema: application/json
Array of objects (WireguardPeer)
object (PaginationMeta)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
get/wireguard_peers
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      • "record_type": "wireguard_peer",
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "updated_at": "2018-02-02T22:25:27.521Z",
      • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
      • "last_seen": "2018-02-02T22:25:27.521Z",
      • "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      • "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU="
      }
    ],
  • "meta": {
    • "total_pages": 3,
    • "total_results": 55,
    • "page_number": 2,
    • "page_size": 25
    }
}

Create a WireGuard Peer

Create a new WireGuard Peer. Current limitation of 5 peers per interface can be created.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

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

The WireGuard PublicKey.

If you do not provide a Public Key, a new Public and Private key pair will be generated for you.

wireguard_interface_id
required
string <uuid>

The id of the wireguard interface associated with the peer.

Responses
202

Successful response

Response Schema: application/json
object (WireguardPeer)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

public_key
string

The WireGuard PublicKey.

If you do not provide a Public Key, a new Public and Private key pair will be generated for you.

last_seen
string

ISO 8601 formatted date-time indicating when peer sent traffic last time.

wireguard_interface_id
string <uuid>

The id of the wireguard interface associated with the peer.

private_key
string

Your WireGuard Interface.PrivateKey.

This attribute is only ever utlised if, on POST, you do NOT provide your own public_key. In which case, a new Public and Private key pair will be generated for you. When your private_key is returned, you must save this immediately as we do not save it within Telnyx. If you lose your Private Key, it can not be recovered.

422

Unprocessable entity. Check the 'detail' field in response for details.

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
post/wireguard_peers
Request samples
application/json
{
  • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
  • "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
}
Response samples
application/json
{
  • "data": {
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "wireguard_peer",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    • "last_seen": "2018-02-02T22:25:27.521Z",
    • "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU="
    }
}

Retrieve the WireGuard Peer

Retrieve the WireGuard peer.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

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

Successful response

Response Schema: application/json
object (WireguardPeer)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

public_key
string

The WireGuard PublicKey.

If you do not provide a Public Key, a new Public and Private key pair will be generated for you.

last_seen
string

ISO 8601 formatted date-time indicating when peer sent traffic last time.

wireguard_interface_id
string <uuid>

The id of the wireguard interface associated with the peer.

private_key
string

Your WireGuard Interface.PrivateKey.

This attribute is only ever utlised if, on POST, you do NOT provide your own public_key. In which case, a new Public and Private key pair will be generated for you. When your private_key is returned, you must save this immediately as we do not save it within Telnyx. If you lose your Private Key, it can not be recovered.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
get/wireguard_peers/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "wireguard_peer",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    • "last_seen": "2018-02-02T22:25:27.521Z",
    • "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU="
    }
}

Update the WireGuard Peer

Update the WireGuard peer.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

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

The WireGuard PublicKey.

If you do not provide a Public Key, a new Public and Private key pair will be generated for you.

Responses
200

Successful response

Response Schema: application/json
object (WireguardPeer)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

public_key
string

The WireGuard PublicKey.

If you do not provide a Public Key, a new Public and Private key pair will be generated for you.

last_seen
string

ISO 8601 formatted date-time indicating when peer sent traffic last time.

wireguard_interface_id
string <uuid>

The id of the wireguard interface associated with the peer.

private_key
string

Your WireGuard Interface.PrivateKey.

This attribute is only ever utlised if, on POST, you do NOT provide your own public_key. In which case, a new Public and Private key pair will be generated for you. When your private_key is returned, you must save this immediately as we do not save it within Telnyx. If you lose your Private Key, it can not be recovered.

422

Unprocessable entity. Check the 'detail' field in response for details.

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
patch/wireguard_peers/{id}
Request samples
application/json
{
  • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU="
}
Response samples
application/json
{
  • "data": {
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "wireguard_peer",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    • "last_seen": "2018-02-02T22:25:27.521Z",
    • "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU="
    }
}

Delete the WireGuard Peer

Delete the WireGuard peer.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

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

Successful response

Response Schema: application/json
object (WireguardPeer)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

public_key
string

The WireGuard PublicKey.

If you do not provide a Public Key, a new Public and Private key pair will be generated for you.

last_seen
string

ISO 8601 formatted date-time indicating when peer sent traffic last time.

wireguard_interface_id
string <uuid>

The id of the wireguard interface associated with the peer.

private_key
string

Your WireGuard Interface.PrivateKey.

This attribute is only ever utlised if, on POST, you do NOT provide your own public_key. In which case, a new Public and Private key pair will be generated for you. When your private_key is returned, you must save this immediately as we do not save it within Telnyx. If you lose your Private Key, it can not be recovered.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
delete/wireguard_peers/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "wireguard_peer",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    • "last_seen": "2018-02-02T22:25:27.521Z",
    • "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU="
    }
}

Retrieve Wireguard config template for Peer

Retrieve Wireguard config template for Peer

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

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

Successful response

Response Schema: text/plain; charset=utf-8
string
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
get/wireguard_peers/{id}/config
Request samples
Response samples
application/json
{
  • "errors": [
    • {
      • "code": "string",
      • "title": "string",
      • "detail": "string",
      • "source": {
        • "pointer": "/json/pointer",
        • "parameter": "string"
        },
      • "meta": { }
      }
    ]
}

List all Allowed IPs for a WireGuard Peer

List all Allowed IPs for a WireGuard peer.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
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

Responses
200

Successful response

Response Schema: application/json
Array of objects (WireguardPeerAllowedIP)
object (PaginationMeta)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
get/wireguard_peers/{id}/allowed_ips
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      • "record_type": "wireguard_allowed_ip",
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "updated_at": "2018-02-02T22:25:27.521Z",
      • "ip_address": "198.51.100.1"
      }
    ],
  • "meta": {
    • "total_pages": 3,
    • "total_results": 55,
    • "page_number": 2,
    • "page_size": 25
    }
}

Retrieve the Allowed IP

Retrieve the Allowed IP.

SecurityBearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
child_id
required
string <uuid>

Identifies the child resource

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

Successful response

Response Schema: application/json
object (WireguardPeerAllowedIP)
id
string <uuid>

Identifies the resource.

record_type
string

Identifies the type of the resource.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

ip_address
string

The IP address to add to the Wireguard Interface's AllowedIP list.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
title
required
string
detail
string
object
meta
object
get/wireguard_peers/{id}/allowed_ips/{child_id}
Request samples
Response samples
application/json
{
  • "data": {
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "wireguard_allowed_ip",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "ip_address": "198.51.100.1"
    }
}