> ## 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.

# popupLocalizationSave

> Save a popup's translations. Each language in `translations` replaces that language's saved copy and adds the language to `supportedLocales`, and each in `deleteLocales` is removed from both; other saved languages are kept. On a published popup, shoppers see the saved copy at once. A popup builder opened before this save replaces these translations when it saves the popup. Select `localization` on the result to read them back. Returns null if no owned popup matches the id. Throws a 400 error with an extension code of INVALID_POPUP_TRANSLATION when a language repeats, a key is not in `localization.entries`, or a translation drops or breaks an HTML tag or placeholder of the source; DUPLICATE_TRANSLATION_KEY when a key repeats within a language; and TOO_MANY_LANGUAGES past 20 languages. A request rejected with one of these errors saves nothing.

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

## Arguments

**deleteLocales** `[\[PopupLocale!\]](/docs/api-reference/v3/reference/marketing/popup-locale)`

Languages whose saved copy is deleted. At most 20.

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

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

**translations** `[\[PopupTranslationInput!\]](/docs/api-reference/v3/reference/marketing/popup-translation-input)`

Languages to save, each replacing that language's saved copy. At most 20.

**fields**

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

The language of this copy.

**texts** `[\[PopupTranslationTextInput!\]!](/docs/api-reference/v3/reference/marketing/popup-translation-text-input)` *required*

The translated strings. Each key may appear once, and must be a `key` in `localization.entries`.

**fields**

**key** `String!` *required*

The `key` of the source string, from `localization.entries`.

**text** `String!` *required*

The translated string. Keep every HTML tag and placeholder of the source.

## Returns

**popupLocalizationSave** `[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**

**allowPageInteraction** `Boolean!` *required*

Whether shoppers can scroll and click the page behind the open popup. False locks the page behind it.

**campaignTargeting** `[PopupCampaignTargeting!](/docs/api-reference/v3/reference/marketing/popup-campaign-targeting)` *required*

Which UTM campaigns the popup is limited to.

**fields**

**mode** `[PopupCampaignTargetingMode!](/docs/api-reference/v3/reference/marketing/popup-campaign-targeting-mode)` *required*

Whether the popup is limited by campaign.

**utmCampaigns** `[String!]!` *required*

The `utm_campaign` values that show the popup when `mode` is UTM\_CAMPAIGNS, matched exactly. Kept, but unused, when `mode` is ALL\_VISITORS.

**closeButton** `[PopupCloseButton!](/docs/api-reference/v3/reference/marketing/popup-close-button)` *required*

How the popup's close (X) button looks.

**fields**

**backgroundColor** `String!` *required*

The color of the circle behind the X, as a hex color such as #FFFFFF. Shown only when `showBackground` is true.

**iconColor** `String!` *required*

The X's color, as a hex color such as #A3A3A3.

**showBackground** `Boolean!` *required*

Whether the X has a colored circle behind it.

**completionTags** `[String!]!` *required*

Tags added to each customer who completes the popup, such as a signup. Empty when none.

**countryTargeting** `[PopupCountryTargeting!](/docs/api-reference/v3/reference/marketing/popup-country-targeting)` *required*

Which shopper countries the popup is shown in.

**fields**

**countries** `[\[CountryCode!\]!](/docs/api-reference/v3/reference/common/country-code)` *required*

The countries INCLUDE or EXCLUDE lists. Kept, but unused, when `mode` is ALL.

**mode** `[PopupCountryTargetingMode!](/docs/api-reference/v3/reference/marketing/popup-country-targeting-mode)` *required*

Which countries the popup is shown in.

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

When the popup was created.

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

Which devices the popup is shown on.

**discountCode** `[DiscountCode](/docs/api-reference/v3/reference/marketing/discount-code)`

The discount offered in the signup flows the popup starts. Null when the popup offers no discount, or its discount was deleted. Reading it needs the `campaigns_read` scope.

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

**fields**

**category** `[DiscountCodeCategory](/docs/api-reference/v3/reference/marketing/discount-code-category)`

What the discount is used for, such as `RECOVER` for the discounts the Recover builder lists. Null when no category is stored.

**code** `String!` *required*

The code customers enter at checkout.

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

When the discount was created.

**description** `String!` *required*

A short human-readable summary of what the code does.

**expiration** `[DiscountCodeExpiration!](/docs/api-reference/v3/reference/marketing/discount-code-expiration)` *required*

When this code stops working.

**fields**

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

The expiry instant when `type` is ON\_DATE.

**days** `Int`

Days after creation when `type` is AFTER\_DAYS.

**type** `[DiscountCodeExpirationType!](/docs/api-reference/v3/reference/marketing/discount-code-expiration-type)` *required*

Whether the code never expires, expires on a date, after a number of days, or on delivery.

**externalId** `String!` *required*

The platform's id for this discount (a Shopify GID or a BigCommerce promotion id).

**groupType** `[DiscountCodeGroupType!](/docs/api-reference/v3/reference/marketing/discount-code-group-type)` *required*

Whether this is one fixed code or a unique code per customer.

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

The id of this discount code.

**kind** `[DiscountCodeKind](/docs/api-reference/v3/reference/marketing/discount-code-kind)`

How the discount reduces the order. Null when the config has no settings type.

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

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

**provider** `[DiscountCodeProvider!](/docs/api-reference/v3/reference/marketing/discount-code-provider)` *required*

The commerce platform that hosts this code.

**settings** `[DiscountCodeSettings](/docs/api-reference/v3/reference/marketing/discount-code-settings)`

How the discount reduces the order.

**title** `String!` *required*

The merchant-facing name of the discount.

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

When the discount was last edited.

**embedCode** `String`

The HTML snippet the merchant pastes into a page to show the popup inline, such as `<div id="redo-marketing-embedded-form-ab1cd"></div>`. Kept when the popup goes back to TRIGGERED, so a pasted snippet keeps working. Null until the popup is first made INLINE.

**frequencyCapHours** `Int!` *required*

How many hours the storefront waits before showing the popup to the same visitor again, from 1 to 720. 24 when the merchant never set one. Applies only to the TIME\_ON\_PAGE, EXIT\_INTENT and BACK\_IN\_STOCK triggers; the Intent AI triggers and inline popups ignore it.

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

The id of this popup.

**languages** `[String!]!` *required*

The languages the popup offers its copy in, as locale codes such as `fr` or `pt-BR`. The translations themselves are written in the builder. Empty when the popup shows only its authored copy.

**launcher** `[JSON](/docs/api-reference/v3/reference/common/json)`

The tab, banner or embedded button that opens the popup. Shape is `launcher` in `popupDesignSchema`. Null when the popup has none.

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

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

**localization** `[PopupLocalization](/docs/api-reference/v3/reference/marketing/popup-localization)`

The popup's supported languages, its translatable strings and its saved translations. Null if the popup was deleted while reading.

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

**fields**

**entries** `[\[PopupTranslationEntry!\]!](/docs/api-reference/v3/reference/marketing/popup-translation-entry)` *required*

The popup's translatable strings, in the source language.

**fields**

**field** `[PopupTranslationField!](/docs/api-reference/v3/reference/marketing/popup-translation-field)` *required*

Where on the popup element the string lives.

**key** `String!` *required*

The string's key, stable while its element exists. Translations are written against it.

**kind** `[PopupTranslationEntryKind!](/docs/api-reference/v3/reference/marketing/popup-translation-entry-kind)` *required*

Whether `text` is plain text or HTML.

**text** `String!` *required*

The string in the popup's source language.

**supportedLocales** `[\[PopupLocale!\]!](/docs/api-reference/v3/reference/marketing/popup-locale)` *required*

Languages enabled for this popup.

**translations** `[\[PopupTranslation!\]!](/docs/api-reference/v3/reference/marketing/popup-translation)` *required*

The saved translations, one per language.

**fields**

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

The language of this copy.

**texts** `[\[PopupTranslationText!\]!](/docs/api-reference/v3/reference/marketing/popup-translation-text)` *required*

The translated strings, by source `key`. A source string with no entry here renders in the source language.

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

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

**pageRules** `[\[PopupPageRule!\]!](/docs/api-reference/v3/reference/marketing/popup-page-rule)` *required*

Which storefront pages show the popup. Empty when it shows on every page.

**fields**

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

Whether matching pages show or hide the popup.

**url** `String!` *required*

A full URL (`https://shop.example.com/products/*`) or a path (`/products/*`). It matches the page exactly, or with `*` standing for any text.

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

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

**renderMode** `[PopupRenderMode!](/docs/api-reference/v3/reference/marketing/popup-render-mode)` *required*

Whether the popup opens over the page or shows inline in it.

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

Whether the popup is published.

**steps** `[JSON!](/docs/api-reference/v3/reference/common/json)` *required*

The popup's steps in order, each with its layout and elements, as the builder saves them. Shape is `steps` in `popupDesignSchema`. A `discountId` inside is the discount code's `legacyId`. Empty when the popup has no steps.

**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.

**opensAutomatically** `Boolean`

For BACK\_IN\_STOCK, whether the popup opens by itself when the shopper selects an out-of-stock variant. When false, only an embed launcher opens it. Null for other kinds.

**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 {
  popupLocalizationSave(deleteLocales: DA, id: "...", translations: { ... }) {
    allowPageInteraction
    completionTags
    createdAt
    device
    embedCode
    frequencyCapHours
    id
    languages
    # ...
  }
}
```


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