Vivoldi Developer API

With Vivoldi’s REST API, you can implement automated and customized features across any environment — whether it’s a website, mobile app, or internal system.
It is designed to let you programmatically control key functionalities from your server or application without accessing the dashboard directly.

The API can be freely invoked from various languages and platforms such as JavaScript, Python, PHP, Java, Android, and iOS.
Each function is provided in a concise and intuitive manner, boosting development efficiency.

To use the API, you’ll need an API key for authentication. Please make sure this key is securely stored and never exposed publicly.

✨ Notes:

  • The API key can be changed up to once per month.
  • Free plan users also have full access to the API.
  • Request limits and response speed may vary depending on your subscription plan.

How to call the API

Request
Host: https://vivoldi.com/api/{uri}
Authorization: APIKey {Your API Key}
Content-type: application/json
User-agent: {Your User-agent}
Accept-Language: en
Simply add Authorisation, Content-type to your Http Header and call the API.
Response
{
	"code": 0,
	"message": "",
	"result": Object
}
FieldsDescriptionType
codeResponse code. A value of 0 indicates success; any non-zero value indicates failure.
This code is independent of the HTTP status and is returned only when the HTTP status is in the 2xx or 3xx range.
int
messageIncluded only when code is not 0. Provides an error message describing the failure.
May be empty or omitted when the response is successful.
string
resultThe actual response data returned by the API. Depending on the API type, the format may be a String or a JSON Object.object

Examples:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<script src="https://code.jquery.com/jquery-3.4.1.min.js" crossorigin="anonymous"></script>
</head>

<body>

<form id="exampleForm">
	<button id="btnCreateLink" type="button">Create Link</button>
</form>

<script type="text/javascript">
$(function(){
	$("#btnCreateLink").on('click', function(evt){
		evt.preventDefault();

		$.ajax({
			type: 'POST',
			url: 'https://vivoldi.com/api/link/v2/create',
			data: JSON.stringify({'url':'https://google.com','domain':'https://vvd.bz'}),
			headers: {'Authorization':'APIKey oc3w9m4ytso9mv5e8yse9XXXXXXXXXX'},
			contentType: 'application/json; charset=utf-8',
			dataType: 'json',
			timeout: 5000
		}).done(function(res){
			if (res.code === 0) {
				alert('short url: ' + res.result);
			} else {
				alert('code: ' + res.code + ', message: ' + res.message);
			}
		}).fail(function(xhr, textStatus, e){
			alert('error: ' + e);
		});
	});
});
</script>

</body>
</html>
<?php
$url = "https://vivoldi.com/api/link/v2/create";
$params = array (
	"url" => "https://www.facebook.com/vivoldi365",
	"domain" => "https://vvd.bz",
);
$body = json_encode($params);

$headers = array(
	"Authorization: APIKey oc3w9m4ytso9mv5e8yse9XXXXXXXXXX",
	"Content-Type: application/json"
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10000);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);

$result = curl_exec($ch);

if ($result === FALSE) {
     echo "Error sending: " . curl_error($ch);
} else {
     print_r($result);
}
curl_close($ch);
?>
package com.example;

import org.json.JSONObject;
import org.springframework.http.HttpStatus;

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CreateLink {
    public static void main(String[] args) {
        try (HttpClient client = HttpClient.newBuilder().build()) {
            JSONObject params = new JSONObject();
            params.put("url", "https://www.facebook.com/vivoldi365");
            params.put("domain", "https://vvd.bz");

            HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://vivoldi.com/api/link/v2/create"))
                .header("Content-Type", "application/json")
                .header("Authorization", "APIKey oc3w9m4ytso9mv5e8yse9XXXXXXXXXX")
                .POST(HttpRequest.BodyPublishers.ofString(params.toString()))
                .build();

            HttpResponse<String> response;
            try {
                response = client.send(request, HttpResponse.BodyHandlers.ofString());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }

            if (response != null) {
                if (response.statusCode() == HttpStatus.OK.value()) {
                    String jsonString = response.body();
                    if (jsonString != null && !jsonString.isEmpty()) {
                        JSONObject json = new JSONObject(jsonString);
                        if (json.getInt("code") == 0) {
                            System.out.println("Short URL: " + json.getString("result"));
                        } else {
                            System.out.println("Failed: " + String.format("[%d] %s", json.getInt("code"), json.getString("message")));
                        }
                    }
                }
            }
        }
    }
}
Please contact Vivoldi if you need REST API improvements or modifications.