Submit a built version of a mini app
curl --request POST \
--url http://localhost:8080/mini-apps/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"code": "<string>",
"css": "<string>",
"declared_network": [
{
"origin": "<string>",
"reason": "<string>"
}
],
"template": "<string>",
"template_version": "<string>"
}
'import requests
url = "http://localhost:8080/mini-apps/submit"
payload = {
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"code": "<string>",
"css": "<string>",
"declared_network": [
{
"origin": "<string>",
"reason": "<string>"
}
],
"template": "<string>",
"template_version": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source: '<string>',
code: '<string>',
css: '<string>',
declared_network: [{origin: '<string>', reason: '<string>'}],
template: '<string>',
template_version: '<string>'
})
};
fetch('http://localhost:8080/mini-apps/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/mini-apps/submit",
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([
'app_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source' => '<string>',
'code' => '<string>',
'css' => '<string>',
'declared_network' => [
[
'origin' => '<string>',
'reason' => '<string>'
]
],
'template' => '<string>',
'template_version' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:8080/mini-apps/submit"
payload := strings.NewReader("{\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"<string>\",\n \"code\": \"<string>\",\n \"css\": \"<string>\",\n \"declared_network\": [\n {\n \"origin\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"template_version\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:8080/mini-apps/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"<string>\",\n \"code\": \"<string>\",\n \"css\": \"<string>\",\n \"declared_network\": [\n {\n \"origin\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"template_version\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/mini-apps/submit")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"<string>\",\n \"code\": \"<string>\",\n \"css\": \"<string>\",\n \"declared_network\": [\n {\n \"origin\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"template_version\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Mini-apps
Submit a mini-app version
Submit changes to a mini-app with edit access. Check user identity, app edit permission, and editor access before sending a build.
POST
/
mini-apps
/
submit
Submit a built version of a mini app
curl --request POST \
--url http://localhost:8080/mini-apps/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"code": "<string>",
"css": "<string>",
"declared_network": [
{
"origin": "<string>",
"reason": "<string>"
}
],
"template": "<string>",
"template_version": "<string>"
}
'import requests
url = "http://localhost:8080/mini-apps/submit"
payload = {
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"code": "<string>",
"css": "<string>",
"declared_network": [
{
"origin": "<string>",
"reason": "<string>"
}
],
"template": "<string>",
"template_version": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source: '<string>',
code: '<string>',
css: '<string>',
declared_network: [{origin: '<string>', reason: '<string>'}],
template: '<string>',
template_version: '<string>'
})
};
fetch('http://localhost:8080/mini-apps/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/mini-apps/submit",
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([
'app_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source' => '<string>',
'code' => '<string>',
'css' => '<string>',
'declared_network' => [
[
'origin' => '<string>',
'reason' => '<string>'
]
],
'template' => '<string>',
'template_version' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:8080/mini-apps/submit"
payload := strings.NewReader("{\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"<string>\",\n \"code\": \"<string>\",\n \"css\": \"<string>\",\n \"declared_network\": [\n {\n \"origin\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"template_version\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:8080/mini-apps/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"<string>\",\n \"code\": \"<string>\",\n \"css\": \"<string>\",\n \"declared_network\": [\n {\n \"origin\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"template_version\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/mini-apps/submit")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"app_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"<string>\",\n \"code\": \"<string>\",\n \"css\": \"<string>\",\n \"declared_network\": [\n {\n \"origin\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ],\n \"template\": \"<string>\",\n \"template_version\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}The acting user must have
mini-apps:write. An empty editor list allows everyone with that permission. When the list is nonempty, only selected editors and the owner can edit. Admins must also satisfy the editor restriction. Bare API keys and users excluded by a restricted list receive 403. An invited user who loses edit permission cannot submit changes.
See Mini-app editing access for invitations, ownership
transfer, and the difference between viewing and editing.Authorizations
Body
application/json
Response
Default Response
Was this page helpful?