Skip to main content

Update the WireGuard Peer

PATCH 
/wireguard_peers/:id

Update the WireGuard peer.

Request

Path Parameters

    id uuidrequired

    Identifies the resource.

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.

Responses

200: Successful response

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

default: Unexpected error

Request samples


curl -L -X PATCH 'https://api.telnyx.com/v2/wireguard_peers/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU="
}'

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="
}
}