---
title: "Deploy a static website"
method: POST
path: "/agent/deploy/static-site"
tags: ["Deploy"]
---

# Deploy a static website

`POST /agent/deploy/static-site`

## Request

- Base URL: `https://edge.network`
- URL: `https://edge.network/agent/deploy/static-site`
- Auth: HTTP bearer

One call from files to live URL: creates a storage bucket, uploads files (base64 upload or git clone), configures CDN, domain, SSL, and DNS. Free tier eligible.

## Headers

- `X-Dry-Run` 'true' | 'false'
- `Idempotency-Key` string

## Request body

- object
  - `project` string, required: Project name (created if it does not exist).
  - `source` object, required: Where the files come from.
    - `type` 'upload' | 'git', required: "upload" for base64 files, "git" to clone a repository.
    - `files` UploadFile[]: Required for type "upload".
      - `path` string, required: File path/key, e.g. "index.html" or "assets/style.css".
      - `content` string, required: Base64-encoded file content.
      - `content_type` string: MIME type. Auto-detected from the extension if omitted.
    - `repo` string: Required for type "git". GitHub/GitLab URL or "user/repo" shorthand.
    - `branch` string: Git branch or tag.
    - `path` string: Subdirectory to deploy (e.g. "dist"). Repository root if omitted.
    - `token` string: Personal access token for private repositories.
  - `domain` string: Custom domain to serve from. SSL auto-provisioned.
  - `options` object
    - `spa_mode` boolean: Single-page-app fallback routing.
    - `image_optimization` boolean

## Response `201`

Deployed. The response includes the live URL.

- TellUserEnvelope: Standard success envelope. Endpoint-specific fields ride alongside tell_user.
  - `tell_user` string, required: Human-readable summary of what happened, for the agent to relay to its operator.

## Other responses

- `400`: Validation error — the response body explains what to fix.
- `401`: Missing or invalid agent access code. The body includes self-signup pointers.
- `429`: Rate limited. Honour Retry-After and the RateLimit-* headers before retrying.

---

[API](https://skmtc.dev/edge/apis/edge-network-agent-api.md) · [All operations](https://skmtc.dev/edge/apis/edge-network-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/edge/apis/edge-network-agent-api/revisions/49b5f2adf020?raw)
