Skip to main content
POST
/
plugins
Create a new plugin
curl --request POST \
  --url https://api.mclicense.org/plugins \
  --header 'Content-Type: application/json' \
  --header 'MCL-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "icon": "<string>",
  "marketplace": "<string>"
}
'
import requests

url = "https://api.mclicense.org/plugins"

payload = {
"name": "<string>",
"icon": "<string>",
"marketplace": "<string>"
}
headers = {
"MCL-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'MCL-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', icon: '<string>', marketplace: '<string>'})
};

fetch('https://api.mclicense.org/plugins', 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/plugins",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'icon' => '<string>',
'marketplace' => '<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/plugins"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"icon\": \"<string>\",\n \"marketplace\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", 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.post("https://api.mclicense.org/plugins")
.header("MCL-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"icon\": \"<string>\",\n \"marketplace\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mclicense.org/plugins")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["MCL-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"icon\": \"<string>\",\n \"marketplace\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "_id": "<string>",
  "icon": "<string>",
  "marketplace": {
    "id": "<string>",
    "url": "<string>"
  }
}

Authorizations

MCL-Key
string
header
required

API key must start with 'mcl_'

Body

application/json
name
string
required

Name of the plugin

icon
string

URL to the plugin's icon

marketplace
string

Voxel Shop (Polymart) marketplace URL

Response

201 - application/json

Plugin created successfully

name
string
required

Name of the plugin

_id
string
read-only

Unique identifier for the plugin

icon
string

URL to the plugin's icon

marketplace
object