Upload a coin's image and details
curl --request POST \
--url https://runners.family/api/metadata \
--header 'Content-Type: application/json' \
--data '
{
"image": {
"base64": "<string>"
},
"authorizationBase64": "<string>",
"authorization": {}
}
'import requests
url = "https://runners.family/api/metadata"
payload = {
"image": { "base64": "<string>" },
"authorizationBase64": "<string>",
"authorization": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
image: {base64: '<string>'},
authorizationBase64: '<string>',
authorization: {}
})
};
fetch('https://runners.family/api/metadata', 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://runners.family/api/metadata",
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([
'image' => [
'base64' => '<string>'
],
'authorizationBase64' => '<string>',
'authorization' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://runners.family/api/metadata"
payload := strings.NewReader("{\n \"image\": {\n \"base64\": \"<string>\"\n },\n \"authorizationBase64\": \"<string>\",\n \"authorization\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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://runners.family/api/metadata")
.header("Content-Type", "application/json")
.body("{\n \"image\": {\n \"base64\": \"<string>\"\n },\n \"authorizationBase64\": \"<string>\",\n \"authorization\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://runners.family/api/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"image\": {\n \"base64\": \"<string>\"\n },\n \"authorizationBase64\": \"<string>\",\n \"authorization\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"namespace": "<string>",
"owner": "So11111111111111111111111111111111111111112",
"digest": "<string>",
"uri": "<string>",
"imageUri": "<string>",
"imageType": "<string>",
"metadata": {}
}{
"error": "<string>",
"code": "request_invalid"
}{
"error": "<string>",
"code": "request_invalid"
}{
"error": "<string>",
"code": "request_invalid"
}{
"error": "<string>",
"code": "request_invalid"
}{
"error": "<string>",
"code": "request_invalid"
}Launch
Upload a coin's image and details
JSON { authorizationBase64, image: { type, base64 } }, where authorizationBase64 is the base64 of the authorization JSON { owner, deploymentId, issuedAt, metadata } plus signatureBase64 if the upload is signed (optional; the message is described in the Launch a coin guide). Send it base64-encoded: the CDN refuses bodies that look like HTML with an HTML 403. A plain authorization object and multipart (image, authorization as a JSON string) are still accepted. Re-uploading the same content returns the same record.
POST
/
api
/
metadata
Upload a coin's image and details
curl --request POST \
--url https://runners.family/api/metadata \
--header 'Content-Type: application/json' \
--data '
{
"image": {
"base64": "<string>"
},
"authorizationBase64": "<string>",
"authorization": {}
}
'import requests
url = "https://runners.family/api/metadata"
payload = {
"image": { "base64": "<string>" },
"authorizationBase64": "<string>",
"authorization": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
image: {base64: '<string>'},
authorizationBase64: '<string>',
authorization: {}
})
};
fetch('https://runners.family/api/metadata', 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://runners.family/api/metadata",
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([
'image' => [
'base64' => '<string>'
],
'authorizationBase64' => '<string>',
'authorization' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://runners.family/api/metadata"
payload := strings.NewReader("{\n \"image\": {\n \"base64\": \"<string>\"\n },\n \"authorizationBase64\": \"<string>\",\n \"authorization\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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://runners.family/api/metadata")
.header("Content-Type", "application/json")
.body("{\n \"image\": {\n \"base64\": \"<string>\"\n },\n \"authorizationBase64\": \"<string>\",\n \"authorization\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://runners.family/api/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"image\": {\n \"base64\": \"<string>\"\n },\n \"authorizationBase64\": \"<string>\",\n \"authorization\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"namespace": "<string>",
"owner": "So11111111111111111111111111111111111111112",
"digest": "<string>",
"uri": "<string>",
"imageUri": "<string>",
"imageType": "<string>",
"metadata": {}
}{
"error": "<string>",
"code": "request_invalid"
}{
"error": "<string>",
"code": "request_invalid"
}{
"error": "<string>",
"code": "request_invalid"
}{
"error": "<string>",
"code": "request_invalid"
}{
"error": "<string>",
"code": "request_invalid"
}Body
application/jsonmultipart/form-data