Easymailing
Members

Update a member

PUT /audiences/{audienceUuid}/members/{uuid}

PUT/audiences/{audienceUuid}/members/{uuid}

Changes the contact data, groups, custom field values or consent of an existing member. Fields you leave out keep their value. WARNING: changing the email or the phone to a different value resets the subscription of that channel for the whole person, in EVERY audience they belong to, not only this one: their email status (or sms_status) becomes empty, so they stop being a confirmed recipient everywhere until each of their members is subscribed again. Any other field leaves the subscription status as it is.

When to use: To correct or complete the data of a member identified by UUID: name, location, custom fields or groups. Change the email or phone only when the user explicitly asks for it, after telling them that the person will have to be subscribed again in all their audiences.

When not to use: To subscribe or unsubscribe someone, use member_subscribe or member_unsubscribe. To add or remove one group without resending the whole list, use member_add_from_group or member_remove_from_group. To add a new person, use create_audience_member. There is no way to change the email and keep the person subscribed: afterwards the person has to be subscribed again with member_subscribe. The name, email, phone and location edited here belong to the person's contact and are shared by all their audiences; the same data can also be changed with update_contact, which additionally handles company, owner, tags and attributes.

Side effects: If email or phone really changes (a different address, ignoring case, or a different number): in every audience of the person, the email status (for email) or sms_status (for phone) is set to empty, and the consent recorded for that channel is invalidated. No confirmation message is sent to the new address or number, so the person is not subscribed again until you call member_subscribe on each audience (it may not be able to do it, see that operation). Groups the member enters or leaves because of the new groups list fire the member_added_to_group and member_removed_from_group webhooks and the group automations.

Permissions: Requires the manager role or higher, or the contacts.write and marketing.audiences.write capabilities.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

audienceUuid*string

UUID of the audience the member belongs to. Get it from list_audiences.

uuid*string

UUID of the member, which is the person's subscription to this audience (not a person id). Get it from list_audience_members or search_member.

Request Body

The updated Member resource

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

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/members/7f3c2a10-5b8e-4d1a-9c2e-3a6f0b9d4e21" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com",    "phone": "string",    "first_name": "string",    "last_name": "string",    "client_ip": "192.168.0.1",    "locale": "string",    "location": {      "city": "string",      "postal_code": "string",      "timezone": "string",      "country_code": "string",      "country": "string",      "lat": 0.1,      "lng": 0.1    },    "groups": [      "/entity/1"    ],    "member_consent": {      "ip": "192.168.0.1",      "consent_at": "2019-08-24T14:15:22Z",      "treatment_purposes": [        "/entity/1"      ]    },    "custom_fields": [      {        "list_field": "/entity/1",        "value": "string"      }    ]  }'
{  "id": 0,  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "email": "user@example.com",  "phone": "string",  "first_name": "string",  "last_name": "string",  "client_ip": "192.168.0.1",  "locale": "string",  "location": {    "city": "string",    "postal_code": "string",    "timezone": "string",    "country_code": "string",    "country": "string",    "lat": 0.1,    "lng": 0.1  },  "status": "suscriber.status.confirmed",  "email_opt_in_source": "suscriber.source.manual",  "email_opt_in_at": "2019-08-24T14:15:22Z",  "email_opt_out_at": "2019-08-24T14:15:22Z",  "sms_status": "suscriber.status.confirmed",  "sms_opt_in_at": "2019-08-24T14:15:22Z",  "sms_opt_out_at": "2019-08-24T14:15:22Z",  "sms_opt_in_source": "api",  "source": "suscriber.source.manual",  "rating": 0.1,  "audience": "string",  "contact": "/entity/1",  "groups": [    {      "title": "string",      "description": "string",      "color": "string",      "public": true    }  ],  "member_consent": {    "ip": "192.168.0.1",    "consent_at": "2019-08-24T14:15:22Z",    "treatment_purposes": [      {        "translations": [          {            "title": "string",            "locale": "string"          }        ],        "description": "string"      }    ]  },  "custom_fields": [    {      "list_field": {        "tag": "string",        "template_tag": "string",        "public": true,        "required": true,        "type": "list.field.type.text"      },      "value": "string"    }  ],  "suscription_form": {    "url": "http://example.com",    "domain": "string",    "title": "string",    "type": "popup",    "double_opt_in": true,    "active": true,    "paused": true  },  "stats": {    "sent": 0,    "delivered_emails": 0,    "unique_opens": 0,    "unique_clicks": 0,    "open_rate": 0,    "click_rate": 0,    "orders": 0,    "revenue": 0,    "order_rate": 0,    "avg_revenue": 0  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}