Skip to content

Publish (create or replace) a site

POST
/ingest/sites
curl --request POST \
--url https://example.com/ingest/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'meta={ "group": "example", "slug": "example", "title": "example", "description": "example", "date": "example", "tags": [ "example" ], "repo": "example", "preview": "example", "hidden": true }' \
--form bundle=@file \
--form index=@file

Requires the publish capability on the target group (admin keys always pass). Idempotent: the same group/slug replaces the existing site.

Media typemultipart/form-data

multipart/form-data with a JSON meta part and either a bundle (a .tar.gz or .zip archive containing an index.html) or an index (a single self-contained HTML document). The archive format is detected from its magic bytes, not the field or file name.

object
meta
required

The meta part of a publish request.

object
group
required
string
slug
required
string
title
string
description
string
date
string
tags
Array<string>
repo
string
preview
string
hidden
boolean
bundle

A .tar.gz or .zip archive containing a top-level index.html. For .zip, if every file lives under one common top-level directory (e.g. a zipped folder site/index.html), that directory is stripped so index.html lands at the site root.

string format: binary
index

A single self-contained HTML document (becomes index.html).

string format: binary

The published site.

Media typeapplication/json
object
url
required
string format: uri
group
required
string
slug
required
string
updated_at
required
string format: date-time
Examplegenerated
{
"url": "https://example.com",
"group": "example",
"slug": "example",
"updated_at": "2026-04-15T12:00:00Z"
}

Invalid request (bad path, malformed body, or missing content).

Media typeapplication/json
object
error
required
string
Examplegenerated
{
"error": "example"
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required
string
Examplegenerated
{
"error": "example"
}

Authenticated, but not permitted for this target/capability.

Media typeapplication/json
object
error
required
string
Examplegenerated
{
"error": "example"
}