Create a WireGuard Peer
POST/wireguard_peers
Create a new WireGuard Peer. Current limitation of 5 peers per interface can be created.
Request
Path Parameters
id uuidrequired
Identifies the resource.
- application/json
Body
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 uuidrequired
The id of the wireguard interface associated with the peer.
Responses
202: Successful response
- application/json
422: Unprocessable entity. Check the 'detail' field in response for details.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/wireguard_peers' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
"wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
}'
Response samples
{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": true,
"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="
}
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}