v52

OpenAPI 3.1.0raw.githubusercontent.com2026-07-311,1941,9384.1 MB
WireGuard Interfaces

Create a WireGuard Peer

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

post/wireguard_peers

Request body

created_atstring

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

idstring uuid

Identifies the resource.

record_typestring

Identifies the type of the resource.

updated_atstring

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

public_keystring

The WireGuard PublicKey.<br /><br />If you do not provide a Public Key, a new Public and Private key pair will be generated for you.

last_seenstring

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

private_keystring

Your WireGuard Interface.PrivateKey.<br /><br />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.

wireguard_interface_idstring uuid required

The id of the wireguard interface associated with the peer.

Example request

{
  "created_at": "2018-02-02T22:25:27.521Z",
  "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
  "record_type": "wireguard_peer",
  "updated_at": "2018-02-02T22:25:27.521Z",
  "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
  "last_seen": "2018-02-02T22:25:27.521Z",
  "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
  "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
}

Response

Successful response

Example response

{
  "data": {
    "created_at": "2018-02-02T22:25:27.521Z",
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "record_type": "wireguard_peer",
    "updated_at": "2018-02-02T22:25:27.521Z",
    "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    "last_seen": "2018-02-02T22:25:27.521Z",
    "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
    "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
  }
}