---
title: "Update the WireGuard Peer"
method: PATCH
path: "/wireguard_peers/{id}"
tags: ["WireGuard Interfaces"]
---

# Update the WireGuard Peer

`PATCH /wireguard_peers/{id}`

Update the WireGuard peer.

## Path parameters

- `id` string, uuid, required

## Request body

- WireguardPeerPatch
  - `public_key` string — 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.

## Response `200`

Successful response

- object
  - `data` 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`.<br /><br />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`.<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.

## Other responses

- `422` — Unprocessable entity. Check the 'detail' field in response for details.
- `default` — Unexpected error

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/versions/8f5f4e537994/schema)
