What is an API?
AirVPN application programming interface (API) allows our customers to access and control their accounts, using custom written software.
If you need some other kind of API please feel free to write in our forums.
- <format> (optional, default 'web') is the output format:
- <key> is your API key. Generate a key from settings page. If you are already logged in AirVPN website, this is optional. Use the key param if you plan to use our API in scripts.
- <service> is the service name, look below for additional reference.
Dates are always in UTC.
Dates that end with "_date" are the dates in the MySql standard format, yyyy-mm-dd hh24:mi:ss.
Dates that end with "_unix" are the dates in UNIX timestamp (integer).
Do not send more than 600 requests every 10 minutes or we will ban your IP address.
Details about yourself, including connection details.
- login (login name)
- register_date (date of registration on our website)
- register_unix (date of registration on our website)
- premium (boolean, if premium or not)
- expiration_unix (date of expiration)
- expiration_date (date of expiration)
- expiration_days (days to the expiration)
- last_attempt_unix (date of last attempt to connect to a VPN server)
- posts (posts in forum)
- credits (account credit)
- last_post (date of last post in forum)
- last_visit_unix (date of last visit on website)
- last_activity_unix (date of last activity on website)
- connected (boolean, if connected or not)
- sessions (array of all sessions, ordered by connected_since)
- vpn_ip (local IP address assigned, 10.*)
- exit_ip (exit IP)
- entry_ip (entry IP)
- server_name (server name)
- server_country (server country name)
- server_country_code (server country code, ISO)
- server_continent (server continent)
- server_location (server location)
- server_bw (server bandwidth: 100 for 100 Mbit/s, 1000 for 1 Gbit/s)
- bytes_read (read bytes in the current session)
- bytes_write (written bytes in the current session)
- connected_since_unix (date of start of the current connection)
- connected_since_date (date of start of the current connection)
- speed_read (read bytes per second)
- speed_write (written bytes per second)
- connection (it's the first session above, for compatibility)
Send a message to yourself.
Choose in the notifications options, under Air -> API, if you want to see it in the web site and/or in an e-mail.
Useful to write to yourself an event that needs attention, for example from a script.
Note: key required in any case.
Requests a disconnection.
Note: key required in any case.
The data available in our https://airvpn.org/status page.
Try it. Some fields:
- server_best is the reccomended server
- bw is the bandwidth used, in mbit/s
- bw_max is the bandwidth available, in mbit/s
- users is the number of users
- servers is the number of servers
- currentload is a percentage of current load
- health: Can be ok, warning or error. If a server is in error status, it doesn't accept connection. For example, a low packet loss may cause a warning status, a high packet loss or maintenance may cause an error status.
- warning: Only exists if health isn't ok, it's the reason.
- ip_entry: Main entry IP address or host
- ip_entry_alt: Alternative entry IP or host for advanced protocols/ports.