This is a major release with breaking changes to the Contacts API and the addition of several new APIs (Topics, Templates, Webhooks, Inbound, Segments, Contact Properties, Contact Topics). The Contacts API has been redesigned to use struct-based arguments for better ergonomics and to support global contacts.
Note: The breaking changes are isolated to the Contacts API only. If you only use the SDK for sending emails, you can upgrade to v3.0.0 without any code changes. The Emails API remains unchanged and fully backward compatible. The Audiences API is deprecated but maintained for backward compatibility.
Contacts.Get to accept *GetContactOptions instead of positional audienceId and id parametersContacts.GetWithContext to accept *GetContactOptions instead of positional audienceId and id parametersContacts.List to accept *ListContactsOptions instead of positional audienceId parameterContacts.ListWithContext to accept *ListContactsOptions instead of positional audienceId parameterContacts.Remove to accept *RemoveContactOptions instead of positional audienceId and id parametersContacts.RemoveWithContext to accept *RemoveContactOptions instead of positional audienceId and id parametersTopics service for managing email topics and subscription preferences #85Templates service for managing email templates #84TemplateId and TemplateAlias on SendEmailRequest for sending emails with templates #84Webhooks service for managing webhook endpoints #86Receiving service for managing inbound email handling and attachments #83Segments service for organizing contacts into segments (replaces Audiences)SegmentId on CreateBroadcastRequest and UpdateBroadcastRequest for targeting segments in broadcastsAudiences service in favor of Segments service (backward compatible wrapper maintained)Contacts.Properties sub-service for managing custom contact properties #90Contacts.Topics sub-service for managing contact topic subscriptions #90AudienceId optional on CreateContactRequest and UpdateContactRequestProperties on CreateContactRequest, UpdateContactRequest, and Contact for custom key-value pairs on global contactsContacts.Segments sub-service for managing contact membership in segments