Skip to content

Publish an artifact

POST
/v1/publish
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.

Media type application/json
object
name
required

Display name.

string
slug

URL slug. Auto-generated if omitted.

string
entrypoint
string
default: index.html
files
required
Array<object>
object
path
required
string
content
required
string
mime
string
encoding
string
Allowed values: utf8 base64
size_bytes
integer
visibility
string
Allowed values: public unlisted private
mobile_html
string
pwa
object
enabled
boolean
name
string
short_name
string
<= 12 characters
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
default: true
systemPrompt
string
model
string
maxTokens
integer
temperature
number
contextJson
boolean
default: true
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"
}
]
}

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
}