Update an audience
PUT /audiences/{uuid}
/audiences/{uuid}Changes an audience's name, description, currency, timezone, default sender, company details, notification settings or GDPR configuration. Fields you leave out keep their current value; inside company and notifications only the fields you send change.
When to use: To rename an audience or change how it behaves, for example its default sender, welcome email, double opt-in or GDPR settings.
When not to use: To create an audience, use create_audience. To change one person's data, use update_audience_member; groups, segments and custom fields have their own operations.
Side effects: The subscription forms of the audience are rebuilt in the background. Existing members and their statuses are not changed.
Permissions: Requires the manager role or higher, or the marketing.audiences.write capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the audience to update. Get it from list_audiences.
The updated Audience resource
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "string", "description": "string", "currency": "string", "timezone": "string", "preferences": { "from_name": "string", "from_email": "/entity/1", "reply_to": "/entity/1" }, "company": { "company_name": "string", "address": "string", "postal_code": "string", "city": "string", "state": "string", "country": "string", "phone": "string", "website_url": "http://example.com" }, "notifications": { "opt_in": "string", "opt_out": "string", "opt_in_notify_email": "user@example.com", "opt_out_notify_email": "user@example.com", "welcome_email": true, "unsubscribe_hard_bounces": true, "unsubscribe_soft_bounces": true, "sms_sender": "/entity/1" }, "list_gdpr": { "enabled": true, "privacy_url": "http://example.com", "treatment_purposes": [ "/entity/1" ], "data_manager": "/entity/1" } }'{ "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "title": "string", "description": "string", "currency": "string", "timezone": "string", "audience_stats": { "score": 0, "sms_score": 0, "total": 0, "active": 0, "canceled": 0 }, "audience_resources": { "campaigns": 0, "automations": 0, "subscription_forms": 0, "landing_pages": 0 }, "preferences": { "from_name": "string", "from_email": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "email": "user@example.com", "confirmed": true }, "reply_to": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "email": "user@example.com", "confirmed": true } }, "company": { "company_name": "string", "address": "string", "postal_code": "string", "city": "string", "state": "string", "country": "string", "phone": "string", "website_url": "http://example.com", "logo_url": "string" }, "notifications": { "opt_in": "string", "opt_out": "string", "opt_in_notify_email": "user@example.com", "opt_out_notify_email": "user@example.com", "welcome_email": true, "unsubscribe_hard_bounces": true, "unsubscribe_soft_bounces": true, "sms_sender": "/entity/1" }, "list_segments": [ { "name": "string", "description": "string", "operator_match": "all", "subscriber_count": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "list_fields": [ { "tag": "string", "template_tag": "string", "public": true, "required": true, "type": "list.field.type.text", "translations": [ { "label": "string", "default_value": "string", "help_text": "string", "locale": "string" } ], "options": { "property1": "string", "property2": "string" }, "list_field_options": [ { "value": "string", "translations": [ { "name": "string", "locale": "string" } ] } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "groups": [ { "title": "string", "description": "string", "suscriber_count": 0, "color": "string", "public": true } ], "list_gdpr": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "enabled": true, "privacy_url": "http://example.com", "list_gdpr_treatment_purposes": [], "treatment_purposes": [ { "translations": [ { "title": "string", "locale": "string" } ], "name": "string", "description": "string", "custom": true } ], "data_manager": { "name": "string", "email": "user@example.com" } }, "total_suscribers": 0, "active_suscribers": 0, "unsuscribed": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}