Publish an artifact
POST
/v1/publish
const url = 'https://shareout.site/v1/publish';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"My App","slug":"my-app","entrypoint":"index.html","visibility":"public","files":[{"path":"index.html","content":"<!DOCTYPE html><h1>Hello</h1>","mime":"text/html","encoding":"utf8"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shareout.site/v1/publish \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "My App", "slug": "my-app", "entrypoint": "index.html", "visibility": "public", "files": [ { "path": "index.html", "content": "<!DOCTYPE html><h1>Hello</h1>", "mime": "text/html", "encoding": "utf8" } ] }'Create a new artifact or push a new version of an existing one.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
Display name.
string
slug
URL slug. Auto-generated if omitted.
string
entrypoint
string
files
required
Array<object>
object
path
required
string
content
required
string
mime
string
encoding
string
size_bytes
integer
visibility
string
mobile_html
string
pwa
object
enabled
boolean
name
string
short_name
string
icon
Data URL or absolute URL to a PNG icon.
string
access_policy
Row-level access policy for per-viewer data filtering.
object
agent
Turns on the visitor chat agent.
object
enabled
boolean
systemPrompt
string
model
string
maxTokens
integer
temperature
number
contextJson
boolean
contextTables
Array<string>
Examples
Example minimal
Single HTML file
{ "name": "My App", "slug": "my-app", "entrypoint": "index.html", "visibility": "public", "files": [ { "path": "index.html", "content": "<!DOCTYPE html><h1>Hello</h1>", "mime": "text/html", "encoding": "utf8" } ]}Responses
Section titled “ Responses ”Published
Media type application/json
object
artifact
object
id
string
version
object
id
string
version_no
integer
deployment
object
slug
string
url
string format: uri
mobile_url
string format: uri
pwa
object
manifest_url
string format: uri
installable
boolean
Example generated
{ "artifact": { "id": "example" }, "version": { "id": "example", "version_no": 1 }, "deployment": { "slug": "example", "url": "https://example.com", "mobile_url": "https://example.com" }, "pwa": { "manifest_url": "https://example.com", "installable": true }}Invalid request
Media type application/json
object
success
required
boolean
error
required
Human-readable message.
string
code
required
Machine-readable error code.
string
Example
{ "success": false}Authentication required
Media type application/json
object
success
required
boolean
error
required
Human-readable message.
string
code
required
Machine-readable error code.
string
Example
{ "success": false}Slug taken or version conflict
Media type application/json
object
success
required
boolean
error
required
Human-readable message.
string
code
required
Machine-readable error code.
string
Example
{ "success": false}