Provides data on the user's system limits for API requests.
Our limits for API requests are 100 per minute and 1000 per hour. When these limits are reached, you will receive a notification,
and you will need to wait a minute or an hour, respectively, before your used limit is reset to zero.
curl --location 'https://api.surl.li/user-api/v1/user/platform-limits' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: {YOUR_KEY}'
$curl = curl_init();
$url = "https://api.surl.li/user-api/v1/user/platform-limits";
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$request = new Request('GET', 'https://api.surl.li/user-api/v1/user/platform-limits', [
'X-API-KEY' => '{YOUR_KEY}'
]);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.surl.li/user-api/v1/user/platform-limits',
'headers': {
'X-API-KEY': '{YOUR_KEY}'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
const requestOptions = {
method: "GET",
headers: myHeaders,
};
fetch("https://api.surl.li/user-api/v1/user/platform-limits", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/user/platform-limits"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
url = "https://api.surl.li/user-api/v1/user/platform-limits"
payload = {}
headers = {
'X-API-KEY': '{YOUR_KEY}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"minute": {
"used": int,
"max": int
},
"hour": {
"used": int,
"max": int
}
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Provides information about the user's usage limits based on their tariff plan.
- A value of -1 indicates unlimited access.
- A value of 0 in the max field means the feature is unavailable under the current tariff plan.
curl --location 'https://api.surl.li/user-api/v1/user/plan-limits' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: {YOUR_KEY}'
$curl = curl_init();
$url = "https://api.surl.li/user-api/v1/user/plan-limits";
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$request = new Request('GET', 'https://api.surl.li/user-api/v1/user/plan-limits', [
'X-API-KEY' => '{YOUR_KEY}'
]);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.surl.li/user-api/v1/user/plan-limits',
'headers': {
'X-API-KEY': '{YOUR_KEY}'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
const requestOptions = {
method: "GET",
headers: myHeaders,
};
fetch("https://api.surl.li/user-api/v1/user/plan-limits", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/user/plan-limits"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
url = "https://api.surl.li/user-api/v1/user/plan-limits"
payload = {}
headers = {
'X-API-KEY': '{YOUR_KEY}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"UTM builder": {
"used": -1,
"max": -1
},
"URL password": {
"used": 0,
"max": 0
},
"Max Urls per Account": {
"used": int,
"max": int
},
...
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Shortens the url with additional options.
Triggered Limits:
curl --location 'https://api.surl.li/user-api/v1/urls/short' \
--header 'X-API-KEY: {YOUR_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"url": "google.com",
"options": {
"alias": "aaa",
"title": "Some Example Title",
"password": "123ABC",
"domain_name": "surl.li",
}
}'
$curl = curl_init();
$url = 'https://api.surl.li/user-api/v1/urls/short';
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"url": "google.com",
"options": {
"alias": "aaa",
"title": "Some Example Title",
"password": "123ABC",
"domain_name": "surl.li",
}
}',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$headers = [
'X-API-KEY' => '{YOUR_KEY}',
'Content-Type' => 'application/json'
];
$body = '{
"url": "google.com",
"options": {
"alias": "aaa",
"title": "Some Example Title",
"password": "123ABC",
"domain_name": "surl.li",
}
}';
$request = new Request('POST', 'https://api.surl.li/user-api/v1/urls/short', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.surl.li/user-api/v1/urls/short',
'headers': {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
},
body: '{
"url": "google.com",
"options": {
"alias": "aaa",
"title": "Some Example Title",
"password": "123ABC",
"domain_name": "surl.li",
}
}'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
myHeaders.append("Content-Type", "application/json");
const raw = "{
"url": "google.com",
"options": {
"alias": "aaa",
"title": "Some Example Title",
"password": "123ABC",
"domain_name": "surl.li",
}
}";
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.surl.li/user-api/v1/urls/short", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/urls/short"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"url": "google.com",`+"
"+`
"options": {`+"
"+`
"alias": "aaa",`+"
"+`
"title": "Some Example Title",`+"
"+`
"password": "123ABC",`+"
"+`
"domain_name": "surl.li",`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.surl.li/user-api/v1/urls/short"
payload = "{
"url": "google.com",
"options": {
"alias": "aaa",
"title": "Some Example Title",
"password": "123ABC",
"domain_name": "surl.li",
}
}"
headers = {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"url": {
"long": "https://google.com",
"short": "https://surl.li/aaa",
"stat": "https://surl.li/aaa+",
"title": "Some Example Title",
"alias": "aaa",
"status": "Linked",
"domain": "surl.li",
"password": "123ABC",
"created_at": "2001-11-21"
},
"reference": {
"url": "https://google.com",
"options": {
"alias": "aaa",
"title": "Some Example Title",
"password": "123ABC",
"domain_name": "surl.li",
}
}
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 422,
"locale": "en",
"message": "Error #422",
"data": {
"errors": array
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Provides information about the created short link.
{surl} - This represents your short link, e.g., surl.li/aa.
curl --location 'https://api.surl.li/user-api/v1/urls/{surl}' \
--header 'X-API-KEY: {YOUR_KEY}' \
--header 'Content-Type: application/json'
$curl = curl_init();
$url = 'https://api.surl.li/user-api/v1/urls/{surl}';
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$headers = [
'X-API-KEY' => '{YOUR_KEY}',
'Content-Type' => 'application/json'
];
$request = new Request('GET', 'https://api.surl.li/user-api/v1/urls/{surl}', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.surl.li/user-api/v1/urls/{surl}',
'headers': {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
var settings = {
"url": "https://api.surl.li/user-api/v1/urls/{surl}",
"method": "GET",
"timeout": 0,
"headers": {
"X-API-KEY": "{YOUR_KEY}",
"Content-Type": "application/json"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/urls/{surl}"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.surl.li/user-api/v1/urls/{surl}"
payload = {}
headers = {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"long": "https://google.com",
"short": "https://surl.li/aaa",
"stat": "https://surl.li/aaa+",
"title": "",
"alias": "aaa",
"status": "Linked",
"domain": "surl.li",
"password": "",
"created_at": "2001-11-21"
"reference": {}
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Deletes a short link.
curl --location --request DELETE 'https://api.surl.li/user-api/v1/urls/{surl}' \
--header 'X-API-KEY: {YOUR_KEY}' \
--header 'Content-Type: application/json'
$curl = curl_init();
$url = 'https://api.surl.li/user-api/v1/urls/{surl}';
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$headers = [
'X-API-KEY' => '{YOUR_KEY}',
'Content-Type' => 'application/json'
];
$request = new Request('DELETE', 'https://api.surl.li/user-api/v1/urls/{surl}', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'DELETE',
'url': 'https://api.surl.li/user-api/v1/urls/{surl}',
'headers': {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
myHeaders.append("Content-Type", "application/json");
const requestOptions = {
method: "DELETE",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.surl.li/user-api/v1/urls/{surl}", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/urls/{surl}"
method := "DELETE"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.surl.li/user-api/v1/urls/{surl}"
payload = {}
headers = {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"reference": []
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Requires access to the "URL password" functionality
curl --location --request PATCH 'https://api.surl.li/user-api/v1/urls/{surl}/password' \
--header 'X-API-KEY: {YOUR_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"password": "123ABC"
}'
$curl = curl_init();
$url = 'https://api.surl.li/user-api/v1/urls/{surl}/password';
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '{
"password": "123ABC"
}',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$headers = [
'X-API-KEY' => '{YOUR_KEY}',
'Content-Type' => 'application/json'
];
$body = '{
"password": "123ABC"
}';
$request = new Request('PATCH', 'https://api.surl.li/user-api/v1/urls/{surl}/password', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://api.surl.li/user-api/v1/urls/{surl}/password',
'headers': {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"password": "123ABC"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"password": "123ABC"
});
const requestOptions = {
method: "PATCH",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.surl.li/user-api/v1/urls/{surl}/password", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/urls/{surl}/password"
method := "PATCH"
payload := strings.NewReader(`{`+"
"+`
"password": "123ABC"`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.surl.li/user-api/v1/urls/{surl}/password"
payload = json.dumps({
"password": "123ABC"
})
headers = {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"reference": {
"password": "123ABC"
}
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 422,
"locale": "en",
"message": "Error #422",
"data": {
"errors": array
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Requires access to the "URL password" functionality
curl --location --request PATCH 'https://api.surl.li/user-api/v1/urls/{surl}/password-change' \
--header 'X-API-KEY: {YOUR_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"password": "123ABC"
}'
$curl = curl_init();
$url = 'https://api.surl.li/user-api/v1/urls/{surl}/password-change';
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '{
"password": "123ABC"
}',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$headers = [
'X-API-KEY' => '{YOUR_KEY}',
'Content-Type' => 'application/json'
];
$body = '{
"password": "123ABC"
}';
$request = new Request('PATCH', 'https://api.surl.li/user-api/v1/urls/{surl}/password-change', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://api.surl.li/user-api/v1/urls/{surl}/password-change',
'headers': {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"password": "123ABC"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"password": "123ABC"
});
const requestOptions = {
method: "PATCH",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.surl.li/user-api/v1/urls/{surl}/password-change", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/urls/{surl}/password-change"
method := "PATCH"
payload := strings.NewReader(`{`+"
"+`
"password": "123ABC"`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.surl.li/user-api/v1/urls/{surl}/password-change"
payload = json.dumps({
"password": "123ABC"
})
headers = {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"reference": {
"password": "123ABC"
}
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 422,
"locale": "en",
"message": "Error #422",
"data": {
"errors": array
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Requires access to the "URL password" functionality
curl --location --request PATCH 'https://api.surl.li/user-api/v1/urls/{surl}/password-remove' \
--header 'X-API-KEY: {YOUR_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"password": "123ABC"
}'
$curl = curl_init();
$url = 'https://api.surl.li/user-api/v1/urls/{surl}/password-remove';
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '{
"password": "123ABC"
}',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$headers = [
'X-API-KEY' => '{YOUR_KEY}',
'Content-Type' => 'application/json'
];
$body = '{
"password": "123ABC"
}';
$request = new Request('PATCH', 'https://api.surl.li/user-api/v1/urls/{surl}/password-remove', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://api.surl.li/user-api/v1/urls/{surl}/password-remove',
'headers': {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"password": "123ABC"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"password": "123ABC"
});
const requestOptions = {
method: "PATCH",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.surl.li/user-api/v1/urls/{surl}/password-remove", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/urls/{surl}/password-remove"
method := "PATCH"
payload := strings.NewReader(`{`+"
"+`
"password": "123ABC"`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.surl.li/user-api/v1/urls/{surl}/password-remove"
payload = json.dumps({
"password": "123ABC"
})
headers = {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"reference": {
"password": "123ABC"
}
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 422,
"locale": "en",
"message": "Error #422",
"data": {
"errors": array
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Changes the alias of your short link
Requires access to the "Alias updates" functionality
curl --location --request PATCH 'https://api.surl.li/user-api/v1/urls/{surl}/change-alias' \
--header 'X-API-KEY: {YOUR_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"alias": "aab"
}'
$curl = curl_init();
$url = 'https://api.surl.li/user-api/v1/urls/{surl}/change-alias';
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '{
"alias": "aab"
}',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$headers = [
'X-API-KEY' => '{YOUR_KEY}',
'Content-Type' => 'application/json'
];
$body = '{
"alias": "aab"
}';
$request = new Request('PATCH', 'https://api.surl.li/user-api/v1/urls/{surl}/change-alias', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://api.surl.li/user-api/v1/urls/{surl}/change-alias',
'headers': {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"alias": "aab"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"alias": "aab"
});
const requestOptions = {
method: "PATCH",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.surl.li/user-api/v1/urls/{surl}/change-alias", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/urls/{surl}/change-alias"
method := "PATCH"
payload := strings.NewReader(`{`+"
"+`
"alias": "aab"`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.surl.li/user-api/v1/urls/{surl}/change-alias"
payload = json.dumps({
"alias": "aab"
})
headers = {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"url": {
"long": "http://hyperhost.ua",
"short": "https://surl.li/aab",
"stat": "https://surl.li/aab+",
"title": "",
"alias": "aab",
"status": "Linked",
"domain": "surl.li",
"password": "",
"created_at": "2001-11-21"
},
"reference": {
"alias": "aab"
}
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 422,
"locale": "en",
"message": "Error #422",
"data": {
"errors": array
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}
Changes the destination link of your short link
Requires access to the "Destination Url updates" functionality
curl --location --request PATCH 'https://api.surl.li/user-api/v1/urls/{surl}/change-alias' \
--header 'X-API-KEY: {YOUR_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://google.com"
}'
$curl = curl_init();
$url = 'https://api.surl.li/user-api/v1/urls/{surl}/change-alias';
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '{
"url": "https://google.com"
}',
CURLOPT_HTTPHEADER => [
'X-API-KEY: {YOUR_KEY}',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
$client = new Client();
$headers = [
'X-API-KEY' => '{YOUR_KEY}',
'Content-Type' => 'application/json'
];
$body = '{
"url": "https://google.com"
}';
$request = new Request('PATCH', 'https://api.surl.li/user-api/v1/urls/{surl}/change-alias', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://api.surl.li/user-api/v1/urls/{surl}/change-alias',
'headers': {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"url": "https://google.com"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
const myHeaders = new Headers();
myHeaders.append("X-API-KEY", "{YOUR_KEY}");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"url": "https://google.com"
});
const requestOptions = {
method: "PATCH",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.surl.li/user-api/v1/urls/{surl}/change-alias", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surl.li/user-api/v1/urls/{surl}/change-alias"
method := "PATCH"
payload := strings.NewReader(`{`+"
"+`
"url": "https://google.com"`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", "{YOUR_KEY}")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.surl.li/user-api/v1/urls/{surl}/change-alias"
payload = json.dumps({
"url": "https://google.com"
})
headers = {
'X-API-KEY': '{YOUR_KEY}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
{
"success": bool,
"code": 0,
"locale": "en",
"message": "OK",
"data": {
"url": {
"long": "https://google.com",
"short": "https://surl.li/aaa",
"stat": "https://surl.li/aaa+",
"title": "Google",
"alias": "aaa",
"status": "Linked",
"domain": "surl.li",
"password": "",
"created_at": "2001-11-21"
},
"reference": {
"url": "https://google.com"
}
}
}
{
"success": false,
"code": 401,
"locale": "en",
"message": "Error #401",
"data": {
"result": false,
"message": "Invalid API key.",
"code": 401
}
}
{
"success": false,
"code": 422,
"locale": "en",
"message": "Error #422",
"data": {
"errors": array
}
}
{
"success": false,
"code": 429,
"locale": "en",
"message": "Error #429",
"data": {
"result": false,
"message": "string",
"code": 429
}
}
{
"success": false,
"code": 500,
"locale": "en",
"message": "Error #500",
"data": {
"message": "Something went wrong. Try again later.",
"reference": []
}
}