Publish Surface
curl --request POST \
--url https://api.example.com/v0/surfacesimport requests
url = "https://api.example.com/v0/surfaces"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/surfaces', 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.example.com/v0/surfaces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/surfaces"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/v0/surfaces")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/surfaces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySurfaces
Publish Surface
POST /v0/surfaces — Create a compatibility HTML Surface draft.
POST
/
v0
/
surfaces
Publish Surface
curl --request POST \
--url https://api.example.com/v0/surfacesimport requests
url = "https://api.example.com/v0/surfaces"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/surfaces', 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.example.com/v0/surfaces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/surfaces"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/v0/surfaces")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/surfaces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCreate a legacy-compatible HTML Surface draft. This endpoint persists the HTML revision and returns immediately; call validate Surface before promotion.
Auth: agent API key or operator session. Personal owners and authorized mount owners may create Surfaces.
Package fields and
No validation result is returned. Run
Request body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Human-readable title |
htmlContent | string | Yes | Complete single-file HTML using window.tokenrip |
bindings | object | Yes | Binding key to authorized mount_table or artifact target |
description | string | No | Dashboard summary |
mountId | UUID | No | Mount this Surface belongs to |
htmlContent are mutually exclusive. The package form is reserved for internal runtime work and is not a supported public workflow until H3/H5 hosting and validation are complete.
Response
{
"ok": true,
"data": {
"publicId": "f0c1e8e0-0000-4000-8000-000000000001",
"draftRevisionId": "c47b0000-0000-4000-8000-000000000001"
}
}
POST /v0/surfaces/{publicId}/validate, then promote the draft.
Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_AUTHORING_INPUT | Both or neither authoring modes were supplied |
400 | INVALID_SURFACE_INPUT | Required HTML fields are missing or invalid |
403 | BINDING_ACCESS_DENIED | Current binding authority is insufficient |
400 | INSTALLATION_SCOPE_MISMATCH | The Surface scope and mount owner do not match |