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.
_19047.webp)
WL API - white-label compatibility gateway Reference
https://api.oem.vpnunlimited.comThe 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
/v1/registrationCreate 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>"
}'{}Password recovery, step 1: send recovery email
/v1/password/recovery/sendStep 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>"
}'{
"login": "<login>"
}Password recovery, step 2: validate token and set new password
/v1/password/recovery/validateStep 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>"
}'{}Refresh session with refresh token
/v1/token/refreshSign 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>"
}'{
"username": "<username>",
"user_id": "<user_id>",
"confirmed": "<confirmed>",
"registration_datetime": "<registration_datetime>",
"access_token": "<access_token>",
"refresh_token": "<refresh_token>"
}Sign in
/v1/loginAuthenticate 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>"
}'{
"username": "<username>",
"user_id": "<user_id>",
"confirmed": "<confirmed>",
"registration_datetime": "<registration_datetime>",
"access_token": "<access_token>",
"refresh_token": "<refresh_token>"
}Sign out
/v1/logoutEnd 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 '{}'{}Account
Change password
/v1/user/password/changeChange 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>"
}'{}Change subscription
/v1/user/subscription/changeChange 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>"
}'{}Delete personal data
/v1/gdpr/deleteRequest 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>"
}'{}Export personal data
/v1/gdpr/exportRequest 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 '{}'{}List user accounts
/v1/user/accountsRetrieve 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>"{
"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
/v1/user/devicesRetrieve 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>"[
{
"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
/v1/user/deviceRemove 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>"{}Send confirmation email
/v1/account/confirm/sendSend 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>"
}'{}VPN configuration
Get account status
/v1/account/statusRetrieve 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>"{
"city": "<city>",
"country": "<country>",
"expired_time": "<expired_time>"
}Get connection configuration
/v1/configRetrieve 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>"{
"config": "<config>",
"config_request_uuid": "<config_request_uuid>"
}Get OpenVPN configuration
/v1/config/ovpnGenerate 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>®ion=<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>"{
"config": "<config>"
}Get WireGuard configuration
/v1/config/wireguardRetrieve 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>"{
"wireguard_config": "<wireguard_config>",
"config_request_uuid": "<config_request_uuid>"
}List available regions
/v1/regionsRetrieve 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>"{
"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
/v1/subscription/cancelCancel 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>"
}'{}Create purchase
/v1/purchase/createCreate 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>"
}'{
"purchase_id": "<purchase_id>"
}Create tariff
/v1/tariff/createCreate 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>"
}'{
"purchase_info_id": "<purchase_info_id>"
}List tariffs
/v1/user/tariffsRetrieve 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>"{
"account_status": "<account_status>",
"purchases": "<purchases>"
}Refund purchase
/v1/purchase/refundRefund 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>"
}'{}Set purchase locale
/v1/purchase/localeSet 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>"
}'{}Update purchase
/v1/purchase/updateUpdate 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>"
}'{
"purchase_info_id": "<purchase_info_id>"
}Update purchase locale
/v1/purchase/locale/updateUpdate 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>"
}'{}