Update a license
curl --request PATCH \
--url https://api.mclicense.org/licenses/{licenseKey} \
--header 'Content-Type: application/json' \
--header 'MCL-Key: <api-key>' \
--data '
{
"maxIps": 123,
"expiresOn": "<string>",
"user": "<string>"
}
'import requests
url = "https://api.mclicense.org/licenses/{licenseKey}"
payload = {
"maxIps": 123,
"expiresOn": "<string>",
"user": "<string>"
}
headers = {
"MCL-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'MCL-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({maxIps: 123, expiresOn: '<string>', user: '<string>'})
};
fetch('https://api.mclicense.org/licenses/{licenseKey}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mclicense.org/licenses/{licenseKey}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'maxIps' => 123,
'expiresOn' => '<string>',
'user' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"MCL-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mclicense.org/licenses/{licenseKey}"
payload := strings.NewReader("{\n \"maxIps\": 123,\n \"expiresOn\": \"<string>\",\n \"user\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("MCL-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mclicense.org/licenses/{licenseKey}")
.header("MCL-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"maxIps\": 123,\n \"expiresOn\": \"<string>\",\n \"user\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mclicense.org/licenses/{licenseKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["MCL-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"maxIps\": 123,\n \"expiresOn\": \"<string>\",\n \"user\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"key": "<string>",
"pluginId": "<string>",
"maxIps": 123,
"expiresOn": "<string>",
"user": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}Licenses
Update License
Updates an existing license’s parameters such as maximum IPs, expiration date, or user
PATCH
/
licenses
/
{licenseKey}
Update a license
curl --request PATCH \
--url https://api.mclicense.org/licenses/{licenseKey} \
--header 'Content-Type: application/json' \
--header 'MCL-Key: <api-key>' \
--data '
{
"maxIps": 123,
"expiresOn": "<string>",
"user": "<string>"
}
'import requests
url = "https://api.mclicense.org/licenses/{licenseKey}"
payload = {
"maxIps": 123,
"expiresOn": "<string>",
"user": "<string>"
}
headers = {
"MCL-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'MCL-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({maxIps: 123, expiresOn: '<string>', user: '<string>'})
};
fetch('https://api.mclicense.org/licenses/{licenseKey}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mclicense.org/licenses/{licenseKey}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'maxIps' => 123,
'expiresOn' => '<string>',
'user' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"MCL-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mclicense.org/licenses/{licenseKey}"
payload := strings.NewReader("{\n \"maxIps\": 123,\n \"expiresOn\": \"<string>\",\n \"user\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("MCL-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mclicense.org/licenses/{licenseKey}")
.header("MCL-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"maxIps\": 123,\n \"expiresOn\": \"<string>\",\n \"user\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mclicense.org/licenses/{licenseKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["MCL-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"maxIps\": 123,\n \"expiresOn\": \"<string>\",\n \"user\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"key": "<string>",
"pluginId": "<string>",
"maxIps": 123,
"expiresOn": "<string>",
"user": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}Authorizations
API key must start with 'mcl_'
Path Parameters
Response
200 - application/json
License updated successfully
Unique license key (alphanumeric + hyphens, max 36 chars)
ID of the associated plugin
Maximum number of IP addresses allowed
Expiration date in ISO 8601 format or 'Never'
Optional user identifier
License creation timestamp
⌘I

