> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# popupUnpublish

> Unpublish a popup so shoppers no longer see it. Repeating it on an unpublished popup returns it unchanged. A rescue-panel A/B test keeps showing the rescue panel to shoppers while it is active, even with its popup unpublished. Fails with `ACTION_REJECTED` (422) when the popup is published and in the store's active rescue-panel A/B test and `endRescuePanelTest` is not set. Returns null if no popup with that id is owned by the caller.

**Required scopes:** [`campaigns_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_write)

## Arguments

**endRescuePanelTest** `Boolean`

For a popup in the store's active rescue-panel A/B test: true unpublishes it and ends the test, false unpublishes it only and leaves the test running. Required then, so the choice is never made for the caller. Ignored for any other popup.

**id** `ID!` *required*

The popup's `id`, or its `legacyId` from an earlier version of the Redo API.

## Returns

**popupUnpublish** `[Popup](/docs/api-reference/v3/reference/marketing/popup)`

A storefront popup: a modal, full-screen or panel form shown to shoppers, often to collect email and SMS signups. Views and signups are not here; read them from an analytics report.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the popup was created.

**id** `ID!` *required*

The id of this popup.

**legacyId** `String!` *required*

The popup's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**name** `String!` *required*

The merchant-facing name of the popup. Empty when it has none.

**publishedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the popup was last published. Null while it is unpublished.

**status** `[PopupStatus!](/docs/api-reference/v3/reference/marketing/popup-status)` *required*

Whether the popup is published.

**target** `[PopupTarget](/docs/api-reference/v3/reference/marketing/popup-target)`

Which visitors the popup is shown to. Null when it has no audience setting.

**testUrl** `String`

Storefront URL that opens this popup for live testing, even while unpublished. Public and unsigned; does not expire. The storefront still enforces device and country targeting, so a mobile-only or geo-targeted popup won't show unless opened from a matching device and country. Null for back-in-stock popups (which require a product page with an out-of-stock variant) or when the store has no storefront domain.

**triggers** `[\[PopupTrigger!\]!](/docs/api-reference/v3/reference/marketing/popup-trigger)` *required*

What shows the popup, in the order the dashboard lists them. Only INLINE when it is embedded. Empty when no trigger is on.

**fields**

**delaySeconds** `Int`

For TIME\_ON\_PAGE, how many seconds the shopper is on the page before the popup shows. Null for other kinds.

**kind** `[PopupTriggerKind!](/docs/api-reference/v3/reference/marketing/popup-trigger-kind)` *required*

What shows the popup.

**type** `[PopupType!](/docs/api-reference/v3/reference/marketing/popup-type)` *required*

How the popup is laid out on desktop, from its first step. POPUP when it has no steps.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the popup was last edited.

## Example

```graphql theme={null}
mutation {
  popupUnpublish(endRescuePanelTest: true, id: "...") {
    createdAt
    id
    legacyId
    name
    publishedAt
    status
    target
    testUrl
    # ...
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.