API ReferencePOST /v1/sites/:id/revisions

POST /v1/sites/:id/revisions

Request a revision to a deployed site. You pick the depth: a Sonnet patch for targeted edits, an Opus rewrite for substantial regeneration.

Cost:

  • Sonnet patch — ~30 credits ($0.30)
  • Opus rewrite — ~80 credits ($0.80)

Charged on successful deploy. Failed revisions don’t deduct.

Request

curl -X POST https://api.warpweb.ai/v1/sites/site_8f3c2a1b/revisions \
  -H "Authorization: Bearer wpwb_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sonnet",
    "instructions": "Change the hero headline to emphasize 24/7 emergency service. Add a phone number to the header."
  }'

Body

FieldTypeRequiredDescription
modelstringyes"sonnet" for a targeted patch (faster, cheaper) or "opus" for a deeper rewrite.
instructionsstringyesPlain-English description of what to change. Be specific — name sections, headlines, or content blocks.
target_sectionsstring[]noOptional list of section identifiers to scope the revision (e.g. ["hero", "services"]). Omit to let the model choose.

When to use which model

  • Sonnet — copy edits, headline changes, adding a phone number, fixing a typo, swapping a CTA. Anything where the structure stays put.
  • Opus — restructuring the site, changing the tone wholesale, adding/removing major sections, big design pivots. Slower; spend the credits when the change actually warrants it.

Response

{
  "revision_id": "rev_2a8f1c3b-4e92-4d51-a724-9f3e8d2c1b6a",
  "site_id": "site_8f3c2a1b-5d47-4c9e-b820-1f8a3e7d9c4f",
  "model": "sonnet",
  "status": "building",
  "created_at": "2026-05-17T15:10:22Z"
}

The revision runs asynchronously. Poll the parent site with GET /v1/sites/:id — the deployed_url updates in place when the revision lands.

For a more reliable signal, configure a revision-status webhook and receive a site.revision_complete or site.revision_failed event.

Errors

StatusErrorCause
400invalid_modelmodel must be "sonnet" or "opus".
402insufficient_creditsAccount balance below the revision cost.
404site_not_foundNo site with that ID belongs to your account.
409revision_in_flightA previous revision is still building. Wait for it to finish (or fail) before queuing another.
422unprocessable_instructionsInstructions were flagged as low-information, contradictory, or in violation of content policy.