POST
/
v1
/
projects
/
{project}
/
boxes
/
{name}
/
publish
cURL
curl --request POST \
  --url https://api.example.com/v1/projects/{project}/boxes/{name}/publish \
  --header 'Content-Type: application/json' \
  --data '
{
  "port": 2,
  "force": true,
  "name": "<string>",
  "public": true
}
'
import requests

url = "https://api.example.com/v1/projects/{project}/boxes/{name}/publish"

payload = {
"port": 2,
"force": True,
"name": "<string>",
"public": True
}
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({port: 2, force: true, name: '<string>', public: true})
};

fetch('https://api.example.com/v1/projects/{project}/boxes/{name}/publish', 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/v1/projects/{project}/boxes/{name}/publish",
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([
'port' => 2,
'force' => true,
'name' => '<string>',
'public' => true
]),
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://api.example.com/v1/projects/{project}/boxes/{name}/publish"

payload := strings.NewReader("{\n \"port\": 2,\n \"force\": true,\n \"name\": \"<string>\",\n \"public\": true\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://api.example.com/v1/projects/{project}/boxes/{name}/publish")
.header("Content-Type", "application/json")
.body("{\n \"port\": 2,\n \"force\": true,\n \"name\": \"<string>\",\n \"public\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/projects/{project}/boxes/{name}/publish")

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 \"port\": 2,\n \"force\": true,\n \"name\": \"<string>\",\n \"public\": true\n}"

response = http.request(request)
puts response.read_body
{
  "host": "<string>",
  "port": 2,
  "public": true,
  "url": "<string>",
  "warning": "<string>"
}

Path Parameters

project
string
required

Project name

name
string
required

Box name

Body

application/json
port
integer<int32>
required
Required range: x >= 1
force
boolean | null
name
string | null
public
boolean

Skip deployment auth: anyone with the URL can reach it.

Response

Box published

One publish record — every endpoint that speaks about a publish speaks this.

host
string
required
port
integer<int32>
required
Required range: x >= 1
public
boolean
required

Effective visibility: true means anyone with the URL can reach it.

url
string
required
warning
string | null

Present only when the publish is public as an unconfigured-auth fallback.