VPN SDK & API to build VPN into your product

Add secure, high-speed VPN to your app without building network infrastructure or protocol stacks from scratch. KeepSolid provides the SDK, the global server backbone, and the security foundation — you keep your brand, your UX, and your roadmap.

Request SDK details
VPN SDK & API to build VPN into your product

WL API - white-label compatibility gateway Reference

https://api.oem.vpnunlimited.com

The public HTTP contract of the white-label gateway. This document describes 27 versioned API endpoints. Request and response fields depend on the selected operation. ## Reading this document Expand an endpoint to read its description, parameters, request body and response examples. Use Example Value and Schema to inspect the payload. GET and DELETE operations use query parameters rather than a request body. Requests require `X-Keepsolid-ApplicationId` and `X-Keepsolid-Authorization`. Authentication signs the exact request bytes; see each operation for its signature format. Operations on the signed-in user's data also require `X-KS-ACCESS-TOKEN`, the access token returned by sign-in, instead of a `session` field; it is not covered by the signature. Bodies above 1 MiB are refused with HTTP `413`. ## Field names Every request and response field name is snake_case, for example `new_password`, `device_id` and `user_info`. The gateway renames fields to and from the spelling of the service handling the operation, so send only the names in this document: a service's own spelling, such as `newpassword`, is not forwarded. ## Results The HTTP status carries the result. A success answers `200`, `201` or `202` depending on the operation, with the operation's fields directly in the body; an operation with nothing to return answers `{}`. Every error answers `{"error":{"app_code":…,"message":"…"}}` with a 4xx or 5xx status: `app_code` names the exact condition and the message is a fixed sentence for it. Each operation lists the codes it can return. Response examples are illustrative; business response fields belong to the service handling the operation.

Authentication

Positive decimal integer; an existing companies_products.id. Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.

Create account

POST/v1/registration

Create a new user account.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
login string
password string
i_agree_terms_and_conditions string

Successful response.

Responses

201
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `10010054` Password does not meet the security requirements. - `10010060` This login cannot be used. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
409
Conflict. Possible `app_code` values: - `14030068` User already exists.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/registration" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "login": "<login>",
  "password": "<password>",
  "i_agree_terms_and_conditions": "<i_agree_terms_and_conditions>"
}'
Response
{}

Password recovery, step 1: send recovery email

POST/v1/password/recovery/send

Step 1 of password recovery. Emails a one-time recovery token for the account. When the response contains `login`, finish the flow with `POST /v1/password/recovery/validate`. When it does not, the product resets the password itself and emails the new one, so there is no second step. The response is successful even for an unknown account.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
login string

Responses

202
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
429
Too many requests. Possible `app_code` values: - `10080058` Too many emails were requested. Try again later.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/password/recovery/send" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "login": "<login>"
}'
Response
{
  "login": "<login>"
}

Password recovery, step 2: validate token and set new password

POST/v1/password/recovery/validate

Step 2 of password recovery. Validates the token from the email sent by `POST /v1/password/recovery/send` and sets `new_password`. The token is single-use and expires after 24 hours. It is consumed as soon as it is checked, even if the new password is then rejected, so check password strength before sending.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
login string
token string
new_password string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `10010053` Password recovery token is invalid or expired. - `10010054` Password does not meet the security requirements. - `10010055` New password must differ from the current one. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040051` Login or password is incorrect.
404
Not found. Possible `app_code` values: - `14020024` User not found.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/password/recovery/validate" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "login": "<login>",
  "token": "<token>",
  "new_password": "<new_password>"
}'
Response
{}

Refresh session with refresh token

POST/v1/token/refresh

Sign in again with the `refresh_token` returned by `POST /v1/login` or by a previous refresh, without the password. Returns the same fields as `POST /v1/login`, including a new `access_token` and `refresh_token`. When two-factor authentication is on, the device in `device_id` must be a trusted one.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
refresh_token string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040050` Refresh token is invalid or expired.
403
Forbidden. Possible `app_code` values: - `14050070` Account is blocked. - `14050071` Device limit reached.
404
Not found. Possible `app_code` values: - `14020024` User not found.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
429
Too many requests. Possible `app_code` values: - `10080052` Too many failed sign-in attempts.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/token/refresh" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "refresh_token": "<refresh_token>"
}'
Response
{
  "username": "<username>",
  "user_id": "<user_id>",
  "confirmed": "<confirmed>",
  "registration_datetime": "<registration_datetime>",
  "access_token": "<access_token>",
  "refresh_token": "<refresh_token>"
}

Sign in

POST/v1/login

Authenticate a user and create a session.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
login string
password string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `10010066` Two-factor code was not requested or has expired. - `10010067` This two-factor authentication type is not enabled. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040051` Login or password is incorrect. - `10040061` Two-factor authentication code is required. - `10040062` Two-factor authentication code is invalid. - `10040063` Two-factor recovery key is invalid.
403
Forbidden. Possible `app_code` values: - `10050056` Password sign-in is not available for this account. - `14050069` Account confirmation is required. - `14050070` Account is blocked. - `14050071` Device limit reached.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
429
Too many requests. Possible `app_code` values: - `10080052` Too many failed sign-in attempts. - `10080057` Sign-in is temporarily locked after repeated wrong passwords. - `10080058` Too many emails were requested. Try again later. - `10080064` Too many two-factor authentication attempts. - `10080065` Too many two-factor code requests. Try again later.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/login" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "login": "<login>",
  "password": "<password>"
}'
Response
{
  "username": "<username>",
  "user_id": "<user_id>",
  "confirmed": "<confirmed>",
  "registration_datetime": "<registration_datetime>",
  "access_token": "<access_token>",
  "refresh_token": "<refresh_token>"
}

Sign out

POST/v1/logout

End the current user session. Send an empty JSON object `{}` as the body. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/logout" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>" \
  -H "Content-Type: application/json" \
  -d '{}'
Response
{}

Account

Change password

PUT/v1/user/password/change

Change the password for the current user. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.
password string
new_password string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `10010054` Password does not meet the security requirements. - `10010055` New password must differ from the current one. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040051` Login or password is incorrect. - `10040074` Access token header is missing.
403
Forbidden. Possible `app_code` values: - `10050056` Password sign-in is not available for this account.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
429
Too many requests. Possible `app_code` values: - `10080059` Too many password change attempts.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X PUT "https://api.oem.vpnunlimited.com/v1/user/password/change" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "password": "<password>",
  "new_password": "<new_password>"
}'
Response
{}

Change subscription

PUT/v1/user/subscription/change

Change the subscription settings for the current user. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.
mode string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X PUT "https://api.oem.vpnunlimited.com/v1/user/subscription/change" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "<mode>"
}'
Response
{}

Delete personal data

POST/v1/gdpr/delete

Request deletion of personal data for the specified user.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
user_id string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
409
Conflict. Possible `app_code` values: - `14030073` A personal data request is already in progress.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/gdpr/delete" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "user_id": "<user_id>"
}'
Response
{}

Export personal data

POST/v1/gdpr/export

Request an export of personal data of the signed-in user, identified by the access token in `X-KS-ACCESS-TOKEN`. A `user_id` field is not forwarded. Send an empty JSON object `{}` as the body.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.

Responses

202
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
409
Conflict. Possible `app_code` values: - `14030073` A personal data request is already in progress.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/gdpr/export" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>" \
  -H "Content-Type: application/json" \
  -d '{}'
Response
{}

List user accounts

GET/v1/user/accounts

Retrieve the current user's VPN account. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.

Successful response: the user's VPN account. Informative fields include id, user_id, owner_id, company_id, created_time, expired_time, time_last, traffic_credit, traffic_used, trialed, trial_period, preferred_protocol, available_protocols, vpn_active and try_personal_server; preferred_protocol and available_protocols are lists of protocol names. The account also carries IP address fields, which are intentionally omitted from the public example.

Responses

200
Successful response: the user's VPN account. Informative fields include id, user_id, owner_id, company_id, created_time, expired_time, time_last, traffic_credit, traffic_used, trialed, trial_period, preferred_protocol, available_protocols, vpn_active and try_personal_server; preferred_protocol and available_protocols are lists of protocol names. The account also carries IP address fields, which are intentionally omitted from the public example.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X GET "https://api.oem.vpnunlimited.com/v1/user/accounts" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
{
  "id": "<id>",
  "user_id": "<user_id>",
  "owner_id": "<owner_id>",
  "company_id": "<company_id>",
  "created_time": "<created_time>",
  "expired_time": "<expired_time>",
  "time_last": "<time_last>",
  "traffic_credit": "<traffic_credit>",
  "traffic_used": "<traffic_used>",
  "trialed": "<trialed>",
  "trial_period": "<trial_period>",
  "preferred_protocol": [
    "<preferred_protocol>"
  ],
  "available_protocols": [
    "<available_protocols>"
  ],
  "vpn_active": "<vpn_active>",
  "try_personal_server": "<try_personal_server>"
}

List user devices

GET/v1/user/devices

Retrieve devices linked to the current user. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.

Successful response: the list of the user's devices. Each device carries id, user_id, uuid, name, platform, platform_version, app_version, created, last_login, last_login_ux, service, active and can_delete.

Responses

200
Successful response: the list of the user's devices. Each device carries id, user_id, uuid, name, platform, platform_version, app_version, created, last_login, last_login_ux, service, active and can_delete.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X GET "https://api.oem.vpnunlimited.com/v1/user/devices" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
[
  {
    "id": "<id>",
    "user_id": "<user_id>",
    "uuid": "<uuid>",
    "name": "<name>",
    "platform": "<platform>",
    "platform_version": "<platform_version>",
    "app_version": "<app_version>",
    "created": "<created>",
    "last_login": "<last_login>",
    "last_login_ux": "<last_login_ux>",
    "service": "<service>",
    "active": "<active>",
    "can_delete": "<can_delete>"
  }
]

Remove device

DELETE/v1/user/device

Remove a device from the current user account. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.
device_id stringRequired
Informative caller field; semantics belong to the owning service.

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
409
Conflict. Possible `app_code` values: - `14030072` Device was not deleted.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X DELETE "https://api.oem.vpnunlimited.com/v1/user/device?device_id=<device_id>" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
{}

Send confirmation email

POST/v1/account/confirm/send

Send a confirmation email for the specified account.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
login string

Responses

202
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
404
Not found. Possible `app_code` values: - `14020024` User not found.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
429
Too many requests. Possible `app_code` values: - `10080058` Too many emails were requested. Try again later.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/account/confirm/send" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "login": "<login>"
}'
Response
{}

VPN configuration

Get account status

GET/v1/account/status

Retrieve the current status of an account. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.

Successful response. Informative account fields include city, country, and expired_time. IP addresses are intentionally omitted from the public example.

Responses

200
Successful response. Informative account fields include city, country, and expired_time. IP addresses are intentionally omitted from the public example.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X GET "https://api.oem.vpnunlimited.com/v1/account/status" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
{
  "city": "<city>",
  "country": "<country>",
  "expired_time": "<expired_time>"
}

Get connection configuration

GET/v1/config

Retrieve the connection configuration available to the current user. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.
region stringRequired
Informative caller field; semantics belong to the owning service.
protocol stringRequired
Informative caller field; semantics belong to the owning service.
platform string
Informative caller field; semantics belong to the owning service.
platform_version string
Informative caller field; semantics belong to the owning service.

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
403
Forbidden. Possible `app_code` values: - `15050048` VPN subscription is missing or expired.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X GET "https://api.oem.vpnunlimited.com/v1/config?region=<region>&protocol=<protocol>&platform=<platform>&platform_version=<platform_version>" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
{
  "config": "<config>",
  "config_request_uuid": "<config_request_uuid>"
}

Get OpenVPN configuration

GET/v1/config/ovpn

Generate an OpenVPN configuration for the current user and selected connection parameters. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.
user_id stringRequired
Informative caller field; semantics belong to the owning service.
region stringRequired
Informative caller field; semantics belong to the owning service.
device_uuid stringRequired
Informative caller field; semantics belong to the owning service.

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
403
Forbidden. Possible `app_code` values: - `10050038` Operation is not available for this company.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X GET "https://api.oem.vpnunlimited.com/v1/config/ovpn?user_id=<user_id>&region=<region>&device_uuid=<device_uuid>" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
{
  "config": "<config>"
}

Get WireGuard configuration

GET/v1/config/wireguard

Retrieve a WireGuard configuration for the current user. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.
hostname stringRequired
Informative caller field; semantics belong to the owning service.
is_vps string
Informative caller field; semantics belong to the owning service.
persistent string
Informative caller field; semantics belong to the owning service.
device_id string
Informative caller field; semantics belong to the owning service.

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
404
Not found. Possible `app_code` values: - `14020049` VPN account not found.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X GET "https://api.oem.vpnunlimited.com/v1/config/wireguard?hostname=<hostname>&is_vps=<is_vps>&persistent=<persistent>&device_id=<device_id>" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
{
  "wireguard_config": "<wireguard_config>",
  "config_request_uuid": "<config_request_uuid>"
}

List available regions

GET/v1/regions

Retrieve the regions available to the current user. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.
all_plus_regions string
Informative caller field; semantics belong to the owning service.
country_code string
Informative caller field; semantics belong to the owning service.

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X GET "https://api.oem.vpnunlimited.com/v1/regions?all_plus_regions=<all_plus_regions>&country_code=<country_code>" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
{
  "flags_cdn_url": "<flags_cdn_url>",
  "servers": "<servers>",
  "stream_servers": "<stream_servers>",
  "personal_servers": "<personal_servers>",
  "optimal_servers": "<optimal_servers>",
  "free_servers": "<free_servers>"
}

Purchases & subscriptions

Cancel subscription

PUT/v1/subscription/cancel

Cancel an existing subscription.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
user_id string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X PUT "https://api.oem.vpnunlimited.com/v1/subscription/cancel" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "user_id": "<user_id>"
}'
Response
{}

Create purchase

POST/v1/purchase/create

Create a purchase using the supplied purchase and transaction details.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
user_id string
purchase_info_id string
transaction_id string

Successful response.

Responses

201
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid. - `15010047` Purchase cannot be applied.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
403
Forbidden. Possible `app_code` values: - `15050046` Company is blocked.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/purchase/create" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "user_id": "<user-id>",
  "purchase_info_id": "<purchase-info-id>",
  "transaction_id": "<payment-transaction-id>"
}'
Response
{
  "purchase_id": "<purchase_id>"
}

Create tariff

POST/v1/tariff/create

Create a tariff using the supplied tariff details.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
product_name string
period string
plan_count string
cost string

Successful response.

Responses

201
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
403
Forbidden. Possible `app_code` values: - `15050046` Company is blocked.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/tariff/create" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "product_name": "<product_name>",
  "period": "<period>",
  "plan_count": "<plan_count>",
  "cost": "<cost>"
}'
Response
{
  "purchase_info_id": "<purchase_info_id>"
}

List tariffs

GET/v1/user/tariffs

Retrieve tariffs available to the current user. Requires the access token of the signed-in user in `X-KS-ACCESS-TOKEN`.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
X-KS-ACCESS-TOKEN stringRequired
Access token of the signed-in user: the access_token returned by POST /v1/login or POST /v1/token/refresh. It identifies the user instead of a session field and is validated by the service handling the operation. It is not covered by the request signature.

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010036` Request query cannot be decoded. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application. - `10040043` Session is invalid or expired. - `10040074` Access token header is missing.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X GET "https://api.oem.vpnunlimited.com/v1/user/tariffs" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "X-KS-ACCESS-TOKEN: <x-ks-access-token>"
Response
{
  "account_status": "<account_status>",
  "purchases": "<purchases>"
}

Refund purchase

PUT/v1/purchase/refund

Refund an existing purchase.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
user_id string
purchase_id string
transaction_id string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X PUT "https://api.oem.vpnunlimited.com/v1/purchase/refund" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "user_id": "<user_id>",
  "purchase_id": "<purchase_id>",
  "transaction_id": "<transaction_id>"
}'
Response
{}

Set purchase locale

POST/v1/purchase/locale

Set the locale for a purchase.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
purchase_info_id string
locale string
localized_title string
localized_description string

Successful response.

Responses

201
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
403
Forbidden. Possible `app_code` values: - `15050046` Company is blocked.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X POST "https://api.oem.vpnunlimited.com/v1/purchase/locale" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "purchase_info_id": "<purchase_info_id>",
  "locale": "<locale>",
  "localized_title": "<localized_title>",
  "localized_description": "<localized_description>"
}'
Response
{}

Update purchase

PUT/v1/purchase/update

Update an existing purchase.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
purchase_info_id string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
403
Forbidden. Possible `app_code` values: - `15050046` Company is blocked.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X PUT "https://api.oem.vpnunlimited.com/v1/purchase/update" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "purchase_info_id": "<purchase_info_id>"
}'
Response
{
  "purchase_info_id": "<purchase_info_id>"
}

Update purchase locale

PUT/v1/purchase/locale/update

Update the locale for an existing purchase.

Parameters

X-Keepsolid-ApplicationId stringRequired
Positive decimal integer; an existing companies_products.id.
X-Keepsolid-Authorization stringRequired
Lowercase 40-character hex HMAC-SHA1. GET and DELETE sign the raw request target; POST and PUT sign the raw body.
purchase_info_id string
locale string
localized_title string
localized_description string

Successful response.

Responses

200
Successful response.
400
Bad request. Possible `app_code` values: - `10010032` Application ID header is missing or invalid. - `12010035` Request body must be a JSON object of scalar values. - `12010044` Request parameters are invalid.
401
Unauthorized. Possible `app_code` values: - `10040033` Authorization header is missing. - `10040034` Request signature is invalid. - `10040037` Unknown application.
405
Method not allowed. `Allow` names the one accepted method. Possible `app_code` values: - `12090030` HTTP method is not allowed for this route.
413
Request body above the 1 MiB limit. Empty body.
500
Internal gateway failure. Possible `app_code` values: - `12070031` Server internal error.
502
An upstream service failed or answered something the gateway cannot use. Possible `app_code` values: - `11060040` Upstream service is unavailable. - `11060041` Upstream service returned an invalid response. - `11060042` Upstream service returned an unexpected error. - `11060045` Upstream service failed to process the request.
504
An upstream service did not answer in time. Possible `app_code` values: - `11060039` Upstream service did not respond in time.
curl -X PUT "https://api.oem.vpnunlimited.com/v1/purchase/locale/update" \
  -H "X-Keepsolid-ApplicationId: <x-keepsolid-applicationid>" \
  -H "X-Keepsolid-Authorization: <x-keepsolid-authorization>" \
  -H "Content-Type: application/json" \
  -d '{
  "purchase_info_id": "<purchase_info_id>",
  "locale": "<locale>",
  "localized_title": "<localized_title>",
  "localized_description": "<localized_description>"
}'
Response
{}