---
title: "Update Retention Default Message Group"
method: PATCH
path: "/v2/retention-default-messages/groups/{id}"
tags: ["Retention Default Messages V2"]
---

# Update Retention Default Message Group

`PATCH /v2/retention-default-messages/groups/{id}`

Renames a logical default mapping group and updates its desired product/locale rows. Added mappings are configured in Apple and removed mappings are deleted from Apple before the local group is updated. The sync endpoint is used to retry failed mappings.

## Path parameters

- `id` string, required — Retention default message group ID

## Request body

- object
  - `name` string — Display name of the default mapping group
  - `product_ids` string[] — Full desired Apple product ID set for the group
  - `locales` string[] — Full desired exact Apple locale short code set

## Response `200`

Success

- object
  - `id` string, required — Unique identifier
  - `object` 'retention_default_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
  - `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
  - `default_messages` object[], required
    - `id` string, required — Unique identifier
    - `object` 'retention_default_message', required — Object type, always `retention_default_message`
    - `application_id` string, required — Application ID
    - `default_message_group_id` integer, nullable, required — an integer
    - `environment` 'sandbox' | 'production', required — Environment this default message mapping applies to
    - `product_id` string, required — Apple product ID
    - `locale` string, required — Locale code for this mapping
    - `retention_message_id` integer, required — Linked retention message ID
    - `message_name` string, required — Linked retention message name
    - `apple_message_identifier` string, required — Apple message identifier configured for this default mapping
    - `apple_sync_state` 'not_synced' | 'syncing' | 'synced' | 'failed', required — Apple default-message sync state
    - `apple_sync_attempt_count` number, required
    - `apple_sync_last_error` string, nullable, required
    - `apple_synced_at` string, nullable, required
    - `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` — An unexpected error occurred on the server

---

[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/e04f76c478af/schema)
