Download OpenAPI specification:Download
The Waven API is a RESTful API. The requests and responses are formated according to the JSON API specification.
In addition to this documentation, we also provide an OpenAPI "yaml" file describing the API: Waven API Specification.
Authentication for the Waven API is based on bearer tokens. You can obtain a bearer token by logging in to your Waven account and generating it.
Then, you can authenticate with the API by including the token in the Authorization header of your requests:
Authorization: Bearer <your_token>
The Waven API supports and enforces pagination strategies for GET collection endpoints.
Cursor-based paging uses the query parameters after and before to specify chunk of data to be returned. Add limit to the parameters to choose how many items returned collection must return at most. The response will include a cursor object containing after and/or before field, if the next and/or previous page exists.
Cursor-based paging is not subject to duplication if new resources are added to the collection. For example, if you are iterating through the services resource via GET /services?limit=10&order=asc(created_time), and a new service is created that has a created_time value after the first service, you will not see a duplicate entry when you fetch the next page at GET /services?limit=10&order=asc(created_time)&after=<cursor.after>.
| id | string |
| order | string^(asc|desc\((created_at)\))$ Example: order=desc(created_at) Sort order: 'desc' for descending default, or 'asc(field)' for ascending on a specific field. Allowed fields: created_at. |
| limit | integer <int32> [ 1 .. 50 ] Default: 10 |
| before | string |
| after | string |
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.waven.it/v1/billing?id=123&limit=1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{- "cursor": { },
- "data": [
- {
- "id": "string",
- "first_name": "string",
- "middle_name": "string",
- "last_name": "string",
- "tax_id": "string",
- "address_line_one": "string",
- "address_line_two": "string",
- "city": "string",
- "country": "string",
- "company_name": "string"
}
]
}| first_name | string or null |
| middle_name | string or null |
| last_name | string or null |
| tax_id required | string |
| address_line_one required | string |
| address_line_two | string or null |
| city required | string |
| country required | string |
| company_name | string or null |
{- "first_name": "string",
- "middle_name": "string",
- "last_name": "string",
- "tax_id": "string",
- "address_line_one": "string",
- "address_line_two": "string",
- "city": "string",
- "country": "string",
- "company_name": "string"
}{- "id": "string",
- "first_name": "string",
- "middle_name": "string",
- "last_name": "string",
- "tax_id": "string",
- "address_line_one": "string",
- "address_line_two": "string",
- "city": "string",
- "country": "string",
- "company_name": "string"
}| id required | string Billing detail ID |
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.waven.it/v1/billing/123",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
| order | string^(asc|desc\((created_at)\))$ Example: order=desc(created_at) Sort order: 'desc' for descending default, or 'asc(field)' for ascending on a specific field. Allowed fields: created_at. |
| limit | integer <int32> [ 1 .. 50 ] Default: 10 |
| before | string |
| after | string |
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.waven.it/v1/proxies/allowed-networks?limit=10",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{- "cursor": { },
- "data": [
- {
- "id": "string",
- "network": "string"
}
]
}| network required | string^([0-9]{1,3}\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-... |
{- "network": "string"
}{- "id": "string",
- "network": "string"
}| id required | string Network ID |
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.waven.it/v1/proxies/allowed-networks/123",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
| id | string |
| order | string^(asc|desc\((created_at)\))$ Example: order=desc(created_at) Sort order: 'desc' for descending default, or 'asc(field)' for ascending on a specific field. Allowed fields: created_at. |
| limit | integer <int32> [ 1 .. 100 ] Default: 50 |
| before | string |
| after | string |
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.waven.it/v1/services?limit=10",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Content-Type: "application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{- "cursor": { },
- "data": [
- {
- "id": "string",
- "start_at": "2019-08-24T14:15:22Z",
- "end_at": "2019-08-24T14:15:22Z",
- "status": "string",
- "traffic_mb_amount": 0,
- "remaining_mb_amount": 0,
- "automatic_ip_change_interval": "string",
- "endpoints": [
- {
- "id": 0,
- "host": "string",
- "port": 0,
- "type": "string"
}
]
}
]
}| plan_id required | string |
| payment_method | string Enum: "STRIPE" "COINBASE" |
| traffic_gb_amount | integer or null |
| is_recurring | boolean |
| billing_detail_id required | string |
{- "plan_id": "string",
- "payment_method": "STRIPE",
- "traffic_gb_amount": 0,
- "is_recurring": true,
- "billing_detail_id": "string"
}{- "code": "badRequest",
- "message": "bad request",
- "details": {
- "code": "PASSWORD_MUST_BE_SET",
- "message": "password must be set"
}
}| id required | string Service ID |
| start_at | string or null <date-time> |
| end_at | string or null <date-time> |
| status | string or null |
| traffic_mb_amount | integer or null <int64> |
| remaining_mb_amount | integer or null <int64> |
| automatic_ip_change_interval | string or null |
Array of objects |
{- "start_at": "2019-08-24T14:15:22Z",
- "end_at": "2019-08-24T14:15:22Z",
- "status": "string",
- "traffic_mb_amount": 0,
- "remaining_mb_amount": 0,
- "automatic_ip_change_interval": "string",
- "endpoints": [
- {
- "id": 0,
- "host": "string",
- "port": 0,
- "type": "string"
}
]
}| id required | string Service ID |
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.waven.it/v1/services/123",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
| id | string |
| status | string Enum: "CREATED" "PAID" "EXPIRED" |
| order | string^(asc|desc\((created_at)\))$ Example: order=desc(created_at) Sort order: 'desc' for descending default, or 'asc(field)' for ascending on a specific field. Allowed fields: created_at. |
| limit | integer <int32> [ 1 .. 100 ] Default: 50 |
| before | string |
| after | string |
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.waven.it/v1/invoices?status=PAID&limit=10",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{- "cursor": { },
- "data": [
- {
- "id": "string",
- "service": {
- "id": "string",
- "start_at": "2019-08-24T14:15:22Z",
- "end_at": "2019-08-24T14:15:22Z",
- "status": "string",
- "traffic_mb_amount": 0,
- "remaining_mb_amount": 0,
- "automatic_ip_change_interval": "string",
- "endpoints": [
- {
- "id": 0,
- "host": "string",
- "port": 0,
- "type": "string"
}
]
}, - "total_amount": 0,
- "plan_quantity": 0,
- "payment_method": "string",
- "status": "string",
- "created_at": "2019-08-24T14:15:22Z"
}
]
}