---
title: "Re-deploy a project"
method: PATCH
path: "/agent/deploy/{projectId}"
tags: ["Deploy"]
---

# Re-deploy a project

`PATCH /agent/deploy/{projectId}`

## Request

- Base URL: `https://edge.network`
- URL: `https://edge.network/agent/deploy/{projectId}`
- Auth: HTTP bearer

Upload changed files to an existing deployment and optionally purge the CDN cache. Set changed_only to skip files whose MD5 matches.

## Path parameters

- `projectId` string, required

## Headers

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

## Request body

- object
  - `source` object
    - `files` UploadFile[]
      - `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.
    - `changed_only` boolean: Skip unchanged files (MD5 comparison).
  - `purge_cdn` boolean: Purge the CDN cache after upload.

## Response `200`

Success.

- 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)
