---
title: "Update saved popup"
method: PATCH
path: "/popups/{popupId}"
tags: ["Widgets"]
---

# Update saved popup

`PATCH /popups/{popupId}`

Updates a saved popup. Only the fields you send change.

Set `status` to `published` to make the popup live, or `draft` to stop it showing while keeping the popup, its stats, and its embed script. `trigger`, `targeting`, `schedule`, `frequency`, and `visual` are merged key by key, so patching one key keeps the rest.

## Path parameters

- `popupId` string, required

## Request body

- object
  - `name` string
  - `status` 'draft' | 'published'
  - `listIds` string[] — Replacement list targeting. Pass an empty array to capture into every list.
  - `tagIds` string[] — Replacement tag IDs. Pass an empty array to clear tags.
  - `duplicateStrategy` 'skip' | 'merge' | 'overwrite'
  - `headline` string — New text for the popup's first heading block. Fails when the popup has no heading block.
  - `description` string — New text for the popup's first paragraph block. Fails when the popup has no paragraph block.
  - `buttonText` string
  - `successMessage` string
  - `redirectUrl` string — HTTP or HTTPS URL for successful signups. Pass an empty string to switch back to the confirmation message.
  - `presentation` 'modal' | 'slide-in' | 'floating-bar' | 'fullscreen'
  - `placement` 'center' | 'left' | 'right' | 'top' | 'bottom'
  - `trigger` SavedPopupTrigger — When the popup opens. Merged key by key into the popup's current trigger.
    - `type` 'delay' | 'scroll' | 'exit-intent' | 'click' | 'manual'
    - `delaySeconds` integer — Used when type is delay.
    - `scrollPercent` integer — Used when type is scroll.
    - `clickSelector` string — CSS selector of the element that opens the popup. Required when type is click.
  - `targeting` SavedPopupTargeting — Where the popup may show. Empty arrays mean no restriction. Merged key by key.
    - `domains` string[]
    - `paths` string[]
    - `excludedPaths` string[]
    - `device` 'all' | 'desktop' | 'mobile'
  - `schedule` SavedPopupSchedule — Optional run window. Use null on either key to clear it. Merged key by key.
    - `startsAt` string, date-time, nullable
    - `endsAt` string, date-time, nullable — Must be later than startsAt.
  - `frequency` SavedPopupFrequency — How often one visitor sees the popup. Merged key by key.
    - `maxDisplays` integer
    - `windowDays` integer
  - `visual` SavedPopupVisual — Media panel and urgency treatment. Merged key by key.
    - `style` 'none' | 'accent' | 'header' | 'rail' | 'image' | 'countdown'
    - `placement` 'top' | 'left' | 'center' | 'right'
    - `imageUrl` string, uri, nullable
    - `imageAlt` string
    - `countdownMinutes` integer, nullable
  - `theme` object — Visual theme overrides merged into the current theme.
  - `blocks` object[] — Complete replacement for the popup's content blocks. The popup must keep exactly one required email field and one submit button.

## Response `200`

Popup updated

- object
  - `success` boolean
  - `popup` SavedPopup — A saved on-site signup popup.
    - `id` string
    - `name` string
    - `status` 'draft' | 'published'
    - `content` object — Complete popup content - template, presentation, placement, theme, settings, trigger, targeting, schedule, frequency, visual, and blocks. Present on detail reads; omitted when listing unless `includeContent=true`.
    - `viewCount` integer — Times the popup was shown to a visitor.
    - `startCount` integer — Times a visitor began filling the popup in. Always between viewCount and conversionCount.
    - `conversionCount` integer — Times a visitor submitted the popup and became a subscriber.
    - `stats` SavedPopupStats — The popup funnel - shown, started, submitted - with rates derived from the raw counters. A rate is null rather than 0 when its denominator is zero, so "nobody has seen it yet" never reads as "nobody converted".
      - `views` integer
      - `starts` integer
      - `conversions` integer
      - `startRate` number, nullable — starts / views, 0-1. Null when the popup has no views.
      - `conversionRate` number, nullable — conversions / views, 0-1. Null when the popup has no views.
      - `completionRate` number, nullable — conversions / starts, 0-1. Null when nobody has started it.
    - `publishedAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `url` string, uri — Dashboard URL for this popup.
  - `embed` SavedPopupEmbed — Deployment snippets for a published popup. Present only when the popup is published; they contain no API key.
    - `scriptUrl` string, uri
    - `javascript` string
    - `react` string
    - `wordpress` string
    - `shopify` string
    - `supportedPlatforms` string[]
  - `message` string

## Other responses

- `400` — Invalid status, audience, redirect URL, or popup content
- `401` — Unauthorized
- `403` — API key is missing widgets:write
- `404` — Popup not found
- `500` — Failed to update popup

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/16ad4f8e3d97/schema)
