First Party Audience API Integration

How to create and edit First Party audiences dynamically via API