Overview
The Contacts API supports two types of contacts:Global Contacts
Modern approach supporting custom properties and segment organization. Recommended for new integrations.
Audience-Specific Contacts
Legacy approach tied to specific audiences. Limited property support.
Global Contacts vs Audience-Specific
Recommendation: Use global contacts for all new integrations. They provide more flexibility with custom properties and segment-based organization.
Creating Contacts
Global Contact
Create a contact without an audience ID to make it globally available.Audience-Specific Contact (Legacy)
Create a contact tied to a specific audience by providing anAudienceId.
Audience-Specific Contact
Custom Properties
Global contacts support custom properties for storing additional metadata. Properties must be defined before use.1
Define Properties
First, create the property definitions you want to use:
2
Use Properties on Contacts
Add the properties when creating or updating contacts:
3
Access Properties
Properties are returned when retrieving contacts:
Retrieving Contacts
Get a single contact by ID or email address.Listing Contacts
Retrieve all contacts with optional pagination.Updating Contacts
Update contact information including properties and subscription status.The
SetUnsubscribed() method is required to set the unsubscribed status to false due to Go’s zero-value behavior with booleans. This will be fixed in v3 of the SDK.Deleting Contacts
Remove contacts by ID or email address.Nested Services
The Contacts service includes three nested services for advanced functionality:Topics
Manage contact topic subscriptions for preference-based email campaigns.Managing Topic Subscriptions
Segments
Add contacts to segments for targeted campaigns.Managing Contact Segments
Properties
Define custom property schemas for contacts.Managing Property Definitions
Complete Example
Here’s a complete workflow demonstrating contact management:Complete Contact Workflow
Best Practices
Use Global Contacts
Prefer global contacts over audience-specific contacts for flexibility and custom properties support.
Define Properties First
Always create property definitions before using them on contacts.
String Values Only
Remember that custom properties currently only accept string values.
Organize with Segments
Use segments instead of audiences to organize contacts into targeted groups.
Next Steps
Segments
Learn how to organize contacts into segments
Broadcasts
Send email campaigns to your contacts
Contact Properties
View the contact properties example
API Reference
View the complete Contacts API reference