{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "name": "Deploy a static site via the Agent API | Edge Docs",
  "headline": "Deploy a static site via the Agent API | Edge Docs",
  "description": "Deploy a static website with one Agent API call: storage, uploads, CDN, domain, SSL and DNS. Upload files directly or deploy from a GitHub or GitLab repo.",
  "url": "https://edge.network/docs/agent/deploy-static-site",
  "image": "https://edge.network/og/docs__agent__deploy-static-site.png",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Edge Network",
    "url": "https://edge.network",
    "logo": "https://edge.network/favicon.svg"
  },
  "isPartOf": {
    "@type": "WebSite",
    "name": "Edge Network",
    "url": "https://edge.network"
  },
  "breadcrumb": {
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://edge.network"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Docs",
        "item": "https://edge.network/docs"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Agent",
        "item": "https://edge.network/docs/agent"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "Deploy static site",
        "item": "https://edge.network/docs/agent/deploy-static-site"
      }
    ]
  },
  "section": "documentation/agent",
  "articleBody": "Docs CDN Deployments, domains, caching, purging and on-the-fly image optimisation. Getting started \n Deployments \n Domains & SSL \n Compute Virtual machines in seconds: networking, firewalls, backups and SSH keys. Getting started \n Creating VMs \n Managing VMs \n DNS Zones, records, geo-routing, backups and development domains. Getting started \n Zone management \n DNS records \n Storage S3-compatible buckets, access keys, presigned URLs and multipart uploads. Getting started \n Buckets \n Access keys \n Shield Privacy-first bot protection: widget modes, siteverify and verified agents. Getting started \n Widget modes \n JavaScript API \n Assist AI answers from your own content: widget, ingestion and the API. Getting started \n Widget & embedding \n Content ingestion \n REST API Manage every Edge resource over HTTPS with API keys. Authentication \n Errors \n Versioning \n Compute \n CDN \n DNS \n CLI One binary for macOS, Linux and Windows to script every product. Installation \n Authentication \n Compute commands \n CDN commands \n DNS commands \n Storage commands \n Dev tooling Command palette and keyboard shortcuts across the console. Command palette \n Agent tooling Let AI agents deploy and manage infrastructure: discovery, MCP and access codes. Start with the overview MCP server \n MCP tool reference \n Connect your tool \n Framework wrappers \n Self-signup \n Access codes \n Discovery endpoint \n Deploy a static site \n Deploy an app \n Projects \n Bot protection \n AI answers \n Account & support Teams, security, audit logs, alerts, billing tools and support. Start with the overview Teams \n Referral programme \n Cost Advisor \n Security \n Two-factor auth \n Audit log \n Alerts \n Support tickets \n Search the docs ⌘K Console Products\n\n CDN Compute DNS Storage Shield Assist Developer tools\n\n REST API CLI Dev tooling Agents\n\n Agent tooling Overview MCP server MCP tool reference Connect your tool Framework wrappers Self-signup Access codes Discovery endpoint Deploy a static site Deploy an app Projects Bot protection AI answers Account\n\n Account & support What it does Copy Anchor Link \n\n The deploy/static-site endpoint orchestrates five services in one call:\n\n Storage: Creates a bucket (named after the project).\n Upload: Uploads files (from the request body or cloned from git).\n CDN: Creates a deployment with the bucket as origin.\n Domain: Adds your domain to the CDN with automatic SSL.\n DNS: Auto-creates a CNAME record if the zone is on Edge DNS.\n Request Copy Anchor Link \n\n HTTP Copy Text POST /agent/deploy/static-site \n Authorization: Bearer ea_live_... \n \n { \n \" project \": \" my-portfolio \", \n \" source \": { \n \" type \": \" upload \", \n \" files \": [ \n { \n \" path \": \" index.html \", \n \" content \": \" PCFET0NUWVBFIGh0bWw+Li4= \", \n \" content_type \": \" text/html \" \n }, \n { \n \" path \": \" styles.css \", \n \" content \": \" Ym9keSB7IG1hcmdpbjogMDsgfQ== \", \n \" content_type \": \" text/css \" \n }, \n { \n \" path \": \" app.js \", \n \" content \": \" Y29uc29sZS5sb2coJ2hlbGxvJyk= \", \n \" content_type \": \" application/javascript \" \n } \n ] \n }, \n \" domain \": \" portfolio.example.com \" \n } Deploy from Git Copy Anchor Link \n\n Instead of uploading files directly, you can deploy from a GitHub or GitLab repository. The agent clones the repo and deploys the specified directory.\n\n HTTP Copy Text POST /agent/deploy/static-site \n Authorization: Bearer ea_live_... \n \n { \n \" project \": \" my-portfolio \", \n \" source \": { \n \" type \": \" git \", \n \" repo \": \" user/my-portfolio \", \n \" branch \": \" main \", \n \" path \": \" dist \" \n }, \n \" domain \": \" portfolio.example.com \" \n } Use the path parameter to specify a subdirectory (e.g. dist or build ). Only that directory will be deployed.\n\n Private repositories Copy Anchor Link \n\n For private repositories, include a personal access token:\n\n JSON Copy Text { \n \" source \": { \n \" type \": \" git \", \n \" repo \": \" user/private-site \", \n \" branch \": \" main \", \n \" path \": \" build \", \n \" token \": \" ghp_xxxxxxxxxxxx \" \n } \n } Parameters Copy Anchor Link \n\n Field Required Description project Yes Project name. Created automatically if it doesn&#x27;t exist. source.type Yes \"upload\" for base64 files, \"git\" to deploy from a repository source.files[] For upload Array of files. Each needs path and content (base64). source.files[].content_type No MIME type. Auto-detected from file extension if omitted. source.repo For git GitHub/GitLab URL or user/repo shorthand source.branch For git Branch or tag. Default: main source.path For git Subdirectory to deploy (e.g. dist , build ). Root if omitted. source.token For git Personal access token for private repositories source.changed_only No Skip unchanged files on update (compares MD5 hashes) domain No Domain to serve from. SSL provisioned automatically. options.spa_mode No Enable single-page app mode (route all paths to index.html ). options.image_optimization No Enable on-the-fly image optimisation via CDN. Response Copy Anchor Link \n\n JSON Copy Text { \n \" status \": \" deployed \", \n \" project_id \": \" proj_a1b2c3d4e5f6 \", \n \" url \": \" https://portfolio.example.com \", \n \" resources_created \": [ \n { \" type \": \" storage_bucket \", \" id \": \" my-portfolio \", \" name \": \" my-portfolio \" }, \n { \" type \": \" cdn_deployment \", \" id \": \" dep_xyz789 \", \" name \": \" my-portfolio \" }, \n { \" type \": \" dns_record \", \" id \": \" zone_abc \", \" note \": \" CNAME portfolio → cdn.edge.network \" } \n ], \n \" tell_user \": \" Your site is live at https://portfolio.example.com. 3 files deployed to Edge CDN with automatic SSL. \" \n } Dry run Copy Anchor Link \n\n Add X-Dry-Run: true to preview what would be created:\n\n HTTP Copy Text POST /agent/deploy/static-site \n Authorization: Bearer ea_live_... \n X-Dry-Run: true \n \n # Response: \n { \n \" dry_run \": true , \n \" would_create \": [ \n { \" type \": \" storage_bucket \", \" name \": \" my-portfolio \" }, \n { \" type \": \" cdn_deployment \", \" name \": \" my-portfolio \" }, \n { \" type \": \" cdn_domain \", \" domain \": \" portfolio.example.com \" }, \n { \" type \": \" dns_record \", \" note \": \" CNAME → cdn.edge.network (if zone on Edge DNS) \" } \n ], \n \" file_count \": 3 , \n \" tell_user \": \" Would create storage bucket, upload 3 files, and configure CDN. Domain portfolio.example.com would be added with SSL. \" \n } Updating a deployment Copy Anchor Link \n\n After the initial deploy, use PATCH /agent/deploy/{projectId} to push updates without recreating resources:\n\n HTTP Copy Text PATCH /agent/deploy/proj_a1b2c3d4e5f6 \n Authorization: Bearer ea_live_... \n \n { \n \" source \": { \n \" type \": \" upload \", \n \" files \": [ \n { \" path \": \" index.html \", \" content \": \" PCFET0NUWVBFIGh0bWw+Li4= \", \" content_type \": \" text/html \" } \n ] \n }, \n \" purge_cdn \": true \n } \n \n # Response: \n { \n \" project \": \" my-portfolio \", \n \" files_uploaded \": 1 , \n \" cdn_purged \": true , \n \" tell_user \": \" Updated \\\"my-portfolio\\\": 1 file uploaded. CDN cache purged. \" \n } Incremental updates Copy Anchor Link \n\n Set changed_only: true to skip uploading files that haven&#x27;t changed. The agent compares MD5 hashes of each file against the existing deployment and only uploads differences.\n\n HTTP Copy Text PATCH /agent/deploy/proj_a1b2c3d4e5f6 \n Authorization: Bearer ea_live_... \n \n { \n \" source \": { \n \" type \": \" upload \", \n \" files \": [ ... ], \n \" changed_only \": true \n }, \n \" purge_cdn \": true \n } \n \n # Response: \n { \n \" project \": \" my-portfolio \", \n \" files_uploaded \": 3 , \n \" files_skipped \": 47 , \n \" cdn_purged \": true , \n \" tell_user \": \" Updated \\\"my-portfolio\\\": 3 files uploaded. 47 unchanged files skipped. CDN cache purged. \" \n } Auto-detected content types Copy Anchor Link \n\n If content_type is omitted, it&#x27;s detected from the file extension:\n\n Extension Content type .html text/html .css text/css .js application/javascript .json application/json .png image/png .jpg image/jpeg .svg image/svg+xml .webp image/webp .woff2 font/woff2 .mp4 video/mp4 .pdf application/pdf .xml application/xml See also Copy Anchor Link \n\n Deploy an application : Deploy a VM-based application\n Projects : Health checks, scaling and teardown\n Somet...",
  "headings": [
    {
      "level": 1,
      "text": "Deploy a static site"
    }
  ],
  "relatedLinks": [
    {
      "@type": "WebPage",
      "name": "Network",
      "url": "https://edge.network/network"
    },
    {
      "@type": "WebPage",
      "name": "Pricing",
      "url": "https://edge.network/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Docs",
      "url": "https://edge.network/docs"
    },
    {
      "@type": "WebPage",
      "name": "Sign in",
      "url": "https://edge.network/console/access"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/cdn/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Deployments",
      "url": "https://edge.network/docs/cdn/deployments"
    },
    {
      "@type": "WebPage",
      "name": "Domains &amp; SSL",
      "url": "https://edge.network/docs/cdn/domains"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/compute/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Creating VMs",
      "url": "https://edge.network/docs/compute/creating-vms"
    },
    {
      "@type": "WebPage",
      "name": "Managing VMs",
      "url": "https://edge.network/docs/compute/managing-vms"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/dns/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Zone management",
      "url": "https://edge.network/docs/dns/zones"
    },
    {
      "@type": "WebPage",
      "name": "DNS records",
      "url": "https://edge.network/docs/dns/records"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/storage/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Buckets",
      "url": "https://edge.network/docs/storage/buckets"
    },
    {
      "@type": "WebPage",
      "name": "Access keys",
      "url": "https://edge.network/docs/storage/access-keys"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/shield/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget modes",
      "url": "https://edge.network/docs/shield/widget-modes"
    },
    {
      "@type": "WebPage",
      "name": "JavaScript API",
      "url": "https://edge.network/docs/shield/js-api"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/assist/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget &amp; embedding",
      "url": "https://edge.network/docs/assist/widget"
    },
    {
      "@type": "WebPage",
      "name": "Content ingestion",
      "url": "https://edge.network/docs/assist/ingestion"
    },
    {
      "@type": "WebPage",
      "name": "Authentication",
      "url": "https://edge.network/docs/api/authentication"
    },
    {
      "@type": "WebPage",
      "name": "Errors",
      "url": "https://edge.network/docs/api/errors"
    },
    {
      "@type": "WebPage",
      "name": "Versioning",
      "url": "https://edge.network/docs/api/versioning"
    },
    {
      "@type": "WebPage",
      "name": "Compute",
      "url": "https://edge.network/docs/api/compute"
    },
    {
      "@type": "WebPage",
      "name": "CDN",
      "url": "https://edge.network/docs/api/cdn"
    },
    {
      "@type": "WebPage",
      "name": "DNS",
      "url": "https://edge.network/docs/api/dns"
    },
    {
      "@type": "WebPage",
      "name": "Installation",
      "url": "https://edge.network/docs/cli/installation"
    },
    {
      "@type": "WebPage",
      "name": "Authentication",
      "url": "https://edge.network/docs/cli/authentication"
    }
  ],
  "alternateFormats": [
    {
      "@type": "MediaObject",
      "contentType": "text/html",
      "url": "https://edge.network/docs/agent/deploy-static-site",
      "name": "HTML version"
    }
  ],
  "dateModified": "2026-11-23T20:28:26.121Z"
}