{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telnyx/json-schema/telnyx-wireguard-peer-create-schema.json",
  "title": "WireguardPeerCreate",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telnyx-wireguard-interfaces-api-openapi.yml#/components/schemas/WireguardPeerCreate",
  "allOf": [
    {
      "$ref": "#/$defs/WireguardPeer"
    },
    {
      "required": [
        "wireguard_interface_id"
      ],
      "title": "WireguardPeerCreate",
      "type": "object"
    }
  ],
  "$defs": {
    "Record": {
      "properties": {
        "created_at": {
          "description": "ISO 8601 formatted date-time indicating when the resource was created.",
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "description": "Identifies the resource.",
          "format": "uuid",
          "readOnly": true,
          "type": "string"
        },
        "record_type": {
          "description": "Identifies the type of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "updated_at": {
          "description": "ISO 8601 formatted date-time indicating when the resource was updated.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "WireguardPeer": {
      "allOf": [
        {
          "$ref": "#/$defs/Record"
        },
        {
          "$ref": "#/$defs/WireguardPeerPatch"
        },
        {
          "properties": {
            "last_seen": {
              "description": "ISO 8601 formatted date-time indicating when peer sent traffic last time.",
              "readOnly": true,
              "type": "string"
            },
            "private_key": {
              "description": "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.",
              "readOnly": true,
              "type": "string"
            },
            "record_type": {
              "description": "Identifies the type of the resource.",
              "readOnly": true,
              "type": "string"
            },
            "wireguard_interface_id": {
              "description": "The id of the wireguard interface associated with the peer.",
              "format": "uuid",
              "type": "string"
            }
          },
          "title": "WireguardPeer",
          "type": "object"
        }
      ]
    },
    "WireguardPeerPatch": {
      "properties": {
        "public_key": {
          "description": "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.",
          "type": "string"
        }
      },
      "title": "WireguardPeerPatch",
      "type": "object"
    }
  }
}