---
title: "Create Retention Configuration Group"
method: POST
path: "/v2/retention-configurations/groups"
tags: ["Retention Configurations V2"]
---

# Create Retention Configuration Group

`POST /v2/retention-configurations/groups`

Creates realtime configurations for multiple products and locales as one backend workflow.

## Request body

- object
  - `application_id` string, required — Application ID to create configurations for
  - `name` string, required — Display name of the configuration group
  - `environment` 'sandbox' | 'production' — Environment for these configurations (defaults to production if omitted)
  - `message_group_id` integer, required — Message group to resolve per-locale variants from
  - `product_ids` string[], required — Apple product IDs
  - `locales` string[], required — Exact runtime locale codes
  - `type` 'message' | 'alternate_product' | 'promotional_offer', required — Type of retention offer: message, alternate_product, or promotional_offer
  - `alternate_product_id` string — Alternate product ID (required for alternate_product type)
  - `offer_identifier` string — Promotional offer identifier (required for promotional_offer type)
  - `offer_product_id` string — Product ID the offer applies to (required for promotional_offer type)

## Response `200`

Success

- object
  - `id` string, required — Unique identifier
  - `object` 'retention_configuration_group', required
  - `application_id` string, required — Application ID
  - `name` string, required — Display name
  - `environment` 'sandbox' | 'production', required — Apple environment: 'sandbox' for testing, 'production' for live
  - `message_group_id` integer, required — an integer
  - `message_group` object, required
    - `id` string, required — Unique identifier
    - `object` 'retention_message_group', required
    - `application_id` string, required — Application ID
    - `name` string, required — Display name
    - `environment` 'sandbox' | 'production', required — Apple environment: 'sandbox' for testing, 'production' for live
    - `default_retention_message_id` integer, nullable, required — an integer
    - `messages` object[], required
      - `id` string, required — Unique identifier
      - `object` 'retention_message', required — Object type, always `retention_message`
      - `application_id` string, required — Application ID
      - `message_group_id` integer, nullable, required — an integer
      - `name` string, required — Display name of the retention message
      - `environment` 'sandbox' | 'production', required — Apple environment this message belongs to
      - `locale` string, required — BCP-47 locale code (e.g. `en-US`)
      - `apple_message_identifier` string, required — Current Apple message identifier
      - `apple_message_state` 'PENDING' | 'APPROVED' | 'REJECTED' | 'UNKNOWN', required — Raw Apple review state for this message identifier
      - `apple_upload_state` 'not_uploaded' | 'uploading' | 'uploaded' | 'failed', required — Superwall-to-Apple upload state
      - `apple_upload_attempt_count` number, required
      - `apple_upload_last_error` string, nullable, required
      - `apple_uploaded_at` string, nullable, required
      - `header` string, required — Message header text
      - `body` string, required — Message body text
      - `alt_text` string, nullable, required — Image alt text, or null
      - `image_identifier` string, nullable, required — Apple image identifier (pre-uploaded), or null
      - `created_at` string, required — ISO 8601 timestamp
      - `updated_at` string, required — ISO 8601 timestamp
    - `created_at` string, required — ISO 8601 timestamp
    - `updated_at` string, required — ISO 8601 timestamp
  - `type` 'message' | 'alternate_product' | 'promotional_offer', required — Type of retention offer: message, alternate_product, or promotional_offer
  - `alternate_product_id` string, nullable, required
  - `offer_identifier` string, nullable, required
  - `offer_product_id` string, nullable, required
  - `configurations` object[], required
    - `id` string, required — Unique identifier
    - `object` 'retention_configuration', required — Object type, always `retention_configuration`
    - `application_id` string, required — Application ID
    - `configuration_group_id` integer, nullable, required — an integer
    - `name` string, required — Display name of the configuration
    - `environment` 'sandbox' | 'production', required — Environment this configuration applies to
    - `product_id` string, required — Apple product ID
    - `locale` string, required — Locale code for this configuration
    - `type` 'message' | 'alternate_product' | 'promotional_offer', required — Type of retention offer: message, alternate_product, or promotional_offer
    - `retention_message_id` integer, required — ID of the linked retention message
    - `alternate_product_id` string, nullable, required — Alternate product ID (for alternate_product type)
    - `offer_identifier` string, nullable, required — Promotional offer identifier (for promotional_offer type)
    - `offer_product_id` string, nullable, required — Product ID the offer applies to (for promotional_offer type)
    - `created_at` string, required — ISO 8601 timestamp
    - `updated_at` string, required — ISO 8601 timestamp
  - `created_at` string, required — ISO 8601 timestamp
  - `updated_at` string, required — ISO 8601 timestamp

## Other responses

- `400` — The request did not match the expected schema
- `401` — No API key was provided in the request
- `403` — The API key does not have permission to perform this action
- `404` — The requested resource was not found
- `429` — Too many requests have been made in a short period
- `500` — A required post-operation side effect failed
- `502` — The upstream retention provider request failed

---

[API](https://skmtc.dev/superwall/apis/superwall-api-v2.md) · [All operations](https://skmtc.dev/superwall/apis/superwall-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/superwall/superwall-api-v2/revisions/44900ad77d2c/schema)
