IPs
The IPs API helps you manage the IP addresses you'll use in your WireGuard setups. You can check specific IP details, create and delete IPs, give them custom names, and easily add or remove public keys as needed. Currently, each assigned IP can have up to three public keys.
Endpoints
Attributes
- Name
id- Type
- string
- Description
Unique identifier for the ip.
- Name
ipv4_address- Type
- string
- Description
The internal IPv4 address.
- Name
ipv4_netmask- Type
- number
- Description
The IPv4 netmask.
- Name
ipv6_address- Type
- string
- Description
The internal IPv6 address.
- Name
ipv6_netmask- Type
- number
- Description
The IPv6 netmask.
- Name
dns- Type
- array
- Description
The available DNS servers.
- Name
device_name- Type
- array
- Description
The device name.
- Name
keys- Type
- array
- Description
All your public keys and a timestamp when these was added.
List all IPs
This endpoint allows you to retrieve a list of all your IPs.
Request
curl -G https://api.azirevpn.com/v3/ips \
-H "Authorization: Bearer {token}"
Response
{
"status": "success",
"data": [
{
"id": "IJiaUdc2",
"ipv4_address": "10.0.1.136",
"ipv4_netmask": 32,
"ipv6_address": "2a0e:1c80:1337:1:10:0:1:136",
"ipv6_netmask": 128,
"dns": [
"10.0.0.1",
"2a0e:1c80:1337:1:10::1",
"91.231.153.2"
],
"device_name": "camel",
"keys": [
{
"key" => "iDG+cT2SvvCIMeJpOhnVQR1TD3D6NyiumDOJdepza1s=",
"created_at" => 1691499313,
}
// ...
]
},
{
"id": "kVje2A6",
"ipv4_address": "10.0.1.14"
// ...
}
]
}
Create IP
Use this endpoint to add a new IP address.
Required attributes
- Name
key- Type
- string
- Description
The public key for the IP.
Request
curl https://api.azirevpn.com/v3/ips \
-H "Authorization: Bearer {token}" \
--json '{
"key": "iDG+cT2SvvCIMeJpOhnVQR1TD3D6NyiumDOJdepza1s="
}'
Response
{
"id": "IJiaUdc2",
"ipv4_address": "10.0.1.136",
"ipv4_netmask": 32,
"ipv6_address": "2a0e:1c80:1337:1:10:0:1:136",
"ipv6_netmask": 128,
"dns": [
"10.0.0.1",
"2a0e:1c80:1337:1:10::1",
"91.231.153.2"
],
"device_name": "camel",
"keys": [
{
"key" => "iDG+cT2SvvCIMeJpOhnVQR1TD3D6NyiumDOJdepza1s=",
"created_at" => 1691499313,
}
]
}
Retrieve IP
This endpoint allows you to retrieve one of your IPs by specifying its unique ID.
Request
curl https://api.azirevpn.com/v3/ips/IJiaUdc2 \
-H "Authorization: Bearer {token}"
Response
{
"status": "success",
"data": [
"id": "IJiaUdc2",
"ipv4_address": "10.0.1.136",
"ipv4_netmask": 32,
"ipv6_address": "2a0e:1c80:1337:1:10:0:1:136",
"ipv6_netmask": 128,
"dns": [
"10.0.0.1",
"2a0e:1c80:1337:1:10::1",
"91.231.153.2"
],
"device_name": "camel",
"keys": [
{
"key" => "iDG+cT2SvvCIMeJpOhnVQR1TD3D6NyiumDOJdepza1s=",
"created_at" => 1691499313,
}
]
]
}
Delete IP
You can utilize this endpoint to remove a specific IP by specifying its unique ID.
Request
curl -X DELETE https://api.azirevpn.com/v3/ips/IJiaUdc2 \
-H "Authorization: Bearer {token}"
Update keys on IP
This endpoint allows you to replace the old keys for a specific IP with your new keys.
Optional attributes
- Name
key- Type
- string
- Description
The public key for the IP.
- Name
keys- Type
- array
- Description
Array of public keys for the IP. Max 3 per IP.
Request
curl -X PUT https://api.azirevpn.com/v3/ips/IJiaUdc2/keys \
-H "Authorization: Bearer {token}" \
--json '{
"key": "GDi+cT2SvvCIMeJpOhnVQR1TD3D6NyiumDOJdepzs1a="
}'
Response
{
"status": "success",
"data": [
{
"key" => "GDi+cT2SvvCIMeJpOhnVQR1TD3D6NyiumDOJdepzs1a=",
"created_at" => 1691499313,
}
]
}