# 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="api-how-tos/set-user-privileges-api">set-user-privileges-api</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="api-how-tos/retrieve-all-wireguard-gateways">retrieve-all-wireguard-gateways</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="api-how-tos/create-wireguard-gateway">create-wireguard-gateway</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="api-how-tos/retrieve-wireguard-gateway">retrieve-wireguard-gateway</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="api-how-tos/ensure-wireguard-gateway">ensure-wireguard-gateway</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="api-how-tos/delete-wireguard-gateway">delete-wireguard-gateway</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="api-how-tos/retrieve-all-wireguard-peers">retrieve-all-wireguard-peers</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="api-how-tos/create-wireguard-peer">create-wireguard-peer</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="api-how-tos/retrieve-wireguard-peer">retrieve-wireguard-peer</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="api-how-tos/ensure-wireguard-peer">ensure-wireguard-peer</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="api-how-tos/delete-wireguard-peer">delete-wireguard-peer</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="api-how-tos/retrieve-all-ipsec-gateways">retrieve-all-ipsec-gateways</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="api-how-tos/create-ipsec-gateways">create-ipsec-gateways</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="api-how-tos/retrieve-ipsec-gateway">retrieve-ipsec-gateway</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="api-how-tos/ensure-ipsec-gateways">ensure-ipsec-gateways</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="api-how-tos/delete-ipsec-gateways">delete-ipsec-gateways</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="api-how-tos/retrieve-all-ipsec-tunnels">retrieve-all-ipsec-tunnels</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="api-how-tos/create-ipsec-tunnel">create-ipsec-tunnel</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="api-how-tos/retrieve-ipsec-tunnel">retrieve-ipsec-tunnel</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="api-how-tos/ensure-ipsec-tunnel">ensure-ipsec-tunnel</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="api-how-tos/delete-ipsec-tunnel">delete-ipsec-tunnel</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`
