# API How-Tos

## API Privileges

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Set API Privileges</strong></mark></td><td>Learn how to set user privileges for VPN Gateway via the API.</td><td><a href="/pages/ZW2GuddlyOTRxM519MSQ">/pages/ZW2GuddlyOTRxM519MSQ</a></td></tr></tbody></table>

## WireGuard Gateways

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Retrieve all WireGuard Gateways</strong></mark></td><td>Endpoint to retrieve all WireGuard VPN Gateways using pagination and optional filters.</td><td><a href="/pages/H5S6JeQnZW4cVRHfOhjf">/pages/H5S6JeQnZW4cVRHfOhjf</a></td></tr><tr><td><mark style="color:blue;"><strong>Create WireGuard Gateway</strong></mark></td><td>Creates a new WireGuard VPN Gateway. The full configuration needs to be provided.</td><td><a href="/pages/5368eBHoH172UyyhSbRE">/pages/5368eBHoH172UyyhSbRE</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve WireGuard Gateway</strong></mark></td><td>Retrieves details of a specific WireGuard VPN Gateway.</td><td><a href="/pages/o9F8S7478NyeHmaffxPI">/pages/o9F8S7478NyeHmaffxPI</a></td></tr><tr><td><mark style="color:blue;"><strong>Update WireGuard Gateway</strong></mark></td><td>Ensures that a WireGuard VPN Gateway with the provided ID is created or modified.</td><td><a href="/pages/uv0ZRQMuaEawcmnguSCf">/pages/uv0ZRQMuaEawcmnguSCf</a></td></tr><tr><td><mark style="color:blue;"><strong>Delete WireGuard Gateway</strong></mark></td><td>Deletes the specified WireGuard Gateway.</td><td><a href="/pages/FMZpuyzKp1IJJhkvwmGi">/pages/FMZpuyzKp1IJJhkvwmGi</a></td></tr></tbody></table>

## WireGuard Peers

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Retrieve all WireGuard Peers</strong></mark></td><td>Endpoint to retrieve all WireGuard Peers associated with a VPN Gateway using pagination and optional filters.</td><td><a href="/pages/RoeMy6nGx70PEPeZjkUR">/pages/RoeMy6nGx70PEPeZjkUR</a></td></tr><tr><td><mark style="color:blue;"><strong>Create WireGuard Peer</strong></mark></td><td>Creates a new WireGuard Peer. The full configuration needs to be provided.</td><td><a href="/pages/ojaWGA0txargQzEazZ2d">/pages/ojaWGA0txargQzEazZ2d</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve WireGuard Peer</strong></mark></td><td>Retrieves details of a specific WireGuard Peer.</td><td><a href="/pages/TgbknNhfNiMTbTj6oHEv">/pages/TgbknNhfNiMTbTj6oHEv</a></td></tr><tr><td><mark style="color:blue;"><strong>Update WireGuard Peer</strong></mark></td><td>Ensures that a WireGuard Peer with the provided ID is created or modified.</td><td><a href="/pages/dNMnexePWSEu3rEltU8v">/pages/dNMnexePWSEu3rEltU8v</a></td></tr><tr><td><mark style="color:blue;"><strong>Delete WireGuard Peer</strong></mark></td><td>Deletes the specified WireGuard Peer.</td><td><a href="/pages/LEYRFqZZXmIqoYmJfWhL">/pages/LEYRFqZZXmIqoYmJfWhL</a></td></tr></tbody></table>

## IPSec Gateways

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Retrieve all IPSec Gateways</strong></mark></td><td>Endpoint to retrieve all IPSec VPN Gateways using pagination and optional filters.</td><td><a href="/pages/Uir4aZQ6qWsH2wUvU2zk">/pages/Uir4aZQ6qWsH2wUvU2zk</a></td></tr><tr><td><mark style="color:blue;"><strong>Create IPSec Gateway</strong></mark></td><td>Creates a new IPSec VPN Gateway. The full configuration needs to be provided.</td><td><a href="/pages/m31CYq6LwBtYGnnORQCr">/pages/m31CYq6LwBtYGnnORQCr</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve IPSec Gateway</strong></mark></td><td>Retrieves details of a specific IPSec VPN Gateway.</td><td><a href="/pages/3JsY7xfQHj6dRHHLcag0">/pages/3JsY7xfQHj6dRHHLcag0</a></td></tr><tr><td><mark style="color:blue;"><strong>Update IPSec Gateway</strong></mark></td><td>Ensures that an IPSec VPN Gateway with the provided ID is created or modified.</td><td><a href="/pages/f6VKJQH48Rzu2qsJNth9">/pages/f6VKJQH48Rzu2qsJNth9</a></td></tr><tr><td><mark style="color:blue;"><strong>Delete IPSec Gateway</strong></mark></td><td>Deletes the specified IPSec Gateway.</td><td><a href="/pages/MAbDfIdQTnHgvY6ydiBb">/pages/MAbDfIdQTnHgvY6ydiBb</a></td></tr></tbody></table>

## IPSec Tunnels

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Retrieve all IPSec Tunnels</strong></mark></td><td>Endpoint to retrieve all IPSec VPN Tunnels associated with an IPSec VPN Gateway using pagination and optional filters.</td><td><a href="/pages/qOTX1PyUj6K0l6UGOXBh">/pages/qOTX1PyUj6K0l6UGOXBh</a></td></tr><tr><td><mark style="color:blue;"><strong>Create IPSec Tunnel</strong></mark></td><td>Creates a new IPSec VPN Tunnel associated with an IPSec VPN Gateway. The full configuration needs to be provided.</td><td><a href="/pages/c9Js0mXqfBI3jpoesJ82">/pages/c9Js0mXqfBI3jpoesJ82</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve IPSec Tunnel</strong></mark></td><td>Retrieves details of a specific IPSec VPN Tunnel.</td><td><a href="/pages/3oL63IsDEy6ed7xnOdvF">/pages/3oL63IsDEy6ed7xnOdvF</a></td></tr><tr><td><mark style="color:blue;"><strong>Update IPSec Tunnel</strong></mark></td><td>Ensures that an IPSec VPN Tunnel with the provided ID is created or modified.</td><td><a href="/pages/EvYJNSAywtWHqrUGTeKL">/pages/EvYJNSAywtWHqrUGTeKL</a></td></tr><tr><td><mark style="color:blue;"><strong>Delete IPSec Tunnel</strong></mark></td><td>Deletes the specified IPSec Tunnel.</td><td><a href="/pages/EPMq27Q5ca3nHkYgvxFr">/pages/EPMq27Q5ca3nHkYgvxFr</a></td></tr></tbody></table>

## Endpoints

A regional endpoint is necessary to interact with the VPN Gateway REST API endpoints. For more information, see the [<mark style="color:blue;">API specification file</mark>](https://api.ionos.com/docs/vpn/v1).

{% hint style="info" %}
**Note:** To prevent any failed requests, make sure to use the regional endpoint that corresponds to the location of the VDC where your VPN Gateway has been established.
{% endhint %}

IONOS Cloud supports the following endpoints for various locations:

* Berlin, Germany: `https://vpn.de-txl.ionos.com`
* Frankfurt, Germany: `https://vpn.de-fra.ionos.com`
* Logroño, Spain: `https://vpn.es-vit.ionos.com`
* London, Great Britain: `https://vpn.gb-lhr.ionos.com`
* Newark, United States: `https://vpn.us-ewr.ionos.com`
* Las Vegas, United States: `https://vpn.us-las.ionos.com`
* Lenexa, United States: `https://vpn.us-mci.ionos.com`
* Paris, France: `https://vpn.fr-par.ionos.com`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/network-services/vpn-gateway/api-how-tos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
