- Newest
- Most votes
- Most comments
Based on the Amazon SES API v2 documentation, I can confirm that the ListContacts API is designed to work with both FilteredStatus and TopicFilter parameters together. The documentation shows that FilteredStatus filters contacts by their subscription status (OPT_IN or OPT_OUT), while TopicFilter allows filtering by a specific topic preference.
The documented example demonstrates using these parameters together to retrieve contacts subscribed to a particular topic. The FilteredStatus parameter specifies whether you want to filter for OPT_IN or OPT_OUT contacts, and when combined with TopicFilter, it should return contacts based on their subscription status for that specific topic.
The TopicFilter includes a UseDefaultIfPreferenceUnavailable parameter that determines whether to use the topic's default preference if a contact doesn't have an explicit preference set. When set to true, the topic default preference will be used for contacts without explicit preferences. When set to false, only contacts with explicitly set preferences are considered for filtering.
Based on the behavior you're describing, where topic-level OPT_OUT preferences in TopicPreferences are not being returned when using FilteredStatus: OPT_OUT with a TopicFilter, this appears to be inconsistent with the documented functionality. The API should evaluate the contact's effective subscription status for the specified topic, which includes both explicit topic preferences and the default subscription status.
For your migration scenario involving bidirectional sync of topic-level unsubscribes, the intended design would allow you to efficiently query contacts by their per-topic subscription status without needing to fetch and filter the entire contact list in your application code. I recommend opening a support case with AWS to investigate this specific behavior, as it may require service team investigation to determine if this is a service limitation or an issue that needs to be addressed.
Sources
Using list management - Amazon Simple Email Service
ListContactsFilter - Amazon Simple Email Service
Relevant content
- asked 2 years ago
- asked 2 years ago
