Skip to content
nexdoc.design Docs

Updating a design

Iterate on an existing job with edit instructions — keep format and history intact.

A job accumulates runs. The first run creates the design; later runs are updates — send edit instructions against the same job_id. The engine rehydrates the previous snapshot and applies your changes.

Start an update run

code
curl -sS -X POST "$NXD_API_URL/v1/jobs/$JOB/runs" \
  -H "Authorization: Bearer $NXD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "landing-page",
    "instructions": "Make the hero darker and change the CTA to Start free trial. Keep the rest of the layout.",
    "content": ""
  }' | jq

Tips:

  • Prefer diff-like instructions (“tighten slide 3”, “swap logo for the dark variant”).
  • Omit or lightly refresh content unless you are replacing copy.
  • Keep the same format unless you intentionally want a different medium.
  • New assets: attach via multipart files or file_ids as in Files and assets.
  • Persist the new run_id. Expect the same wait as a create (1–5 minutes simple, 10–20 minutes for decks and reports), or set notify_email: true.

Compare versions

List runs:

code
curl -sS "$NXD_API_URL/v1/jobs/$JOB/runs" \
  -H "Authorization: Bearer $NXD_API_KEY" | jq

Each completed run has its own commit_hash / viewer_url. Export or publish a specific run with run_id in the body.

Cancel an in-flight run

code
curl -sS -X POST "$NXD_API_URL/v1/jobs/$JOB/runs/$RUN_ID/cancel" \
  -H "Authorization: Bearer $NXD_API_KEY" | jq
# → { "status": "cancelling" }

Returns 409 if the run is already terminal.