---
title: "POST /v2/retention-campaigns/configurations"
method: POST
path: "/v2/retention-campaigns/configurations"
tags: ["retentionCampaignsV2"]
---

# POST /v2/retention-campaigns/configurations

`POST /v2/retention-campaigns/configurations`

## Request

- Base URL: `https://api.superwall.com`
- URL: `https://api.superwall.com/v2/retention-campaigns/configurations`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `accounts_superwall_token`
  - HTTP bearer

## Request body

- object
  - `application_id` string, required
  - `environment` 'sandbox' | 'production', required: Apple environment: 'sandbox' for testing, 'production' for live
  - `name` string, required
  - `message_group_id` integer, required: Message group to resolve per-locale variants from
  - `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
  - `object` 'retention_configuration_group', required
  - `application_id` string, required
  - `name` string, required: Display name
  - `environment` 'sandbox' | 'production', required: Apple environment: 'sandbox' for testing, 'production' for live
  - `message_group_id` integer, required
  - `message_group` object, required
    - `id` string, required
    - `object` 'retention_message_group', required
    - `application_id` string, required
    - `name` string, required: Display name
    - `environment` 'sandbox' | 'production', required: Apple environment: 'sandbox' for testing, 'production' for live
    - `default_retention_message_id` integer, nullable, required
    - `messages` object[], required
      - `id` string, required
      - `object` 'retention_message', required: Object type, always `retention_message`
      - `application_id` string, required
      - `message_group_id` integer, nullable, required: Logical message group ID, or null for legacy/standalone messages
      - `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
    - `object` 'retention_configuration', required: Object type, always `retention_configuration`
    - `application_id` string, required
    - `configuration_group_id` integer, nullable, required: Logical realtime configuration group ID, or null for legacy/standalone rows
    - `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 | The request was invalid or malformed
- `401`: No API key was provided in the request | The API key does not have a valid format | The API key is invalid or has been revoked | An error occurred while validating the API key | The session cookie is invalid or expired
- `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`: An unexpected error occurred on the server | A required post-operation side effect failed
- `502`: The upstream retention provider request failed

## Changes

- **2026-10-29** `778a11cd2c15`: 5 warning, 4 info
  - added the new `credentials_missing` enum value to the `anyOf[subschema #2]/code` response property for the response status `400`
  - added the new `credentials_missing` enum value to the `code/anyOf[subschema #1]/` response property for the response status `403`
  - added the new `credentials_missing` enum value to the `code/anyOf[subschema #1]/` response property for the response status `404`
  - added the new `credentials_missing` enum value to the `code/anyOf[subschema #1]/` response property for the response status `429`
  - …5 more
- **2026-10-14** `a41d471f35eb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/superwall/apis/superwall-api-v2/changes/v2/retention-campaigns/configurations/post.md)

---

[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.dev/superwall/apis/superwall-api-v2/revisions/523b4734dfab?raw)
