Subscribe a member again
PUT /audiences/{audienceUuid}/members/{uuid}/actions/subscribe
/audiences/{audienceUuid}/members/{uuid}/actions/subscribeAsks to subscribe again the email channel, the SMS channel or both of a member who already exists in the audience. It is a request, not a guarantee: the channel is confirmed at once only in some cases (see side effects); otherwise the person gets a confirmation message and the status does not change until they confirm.
When to use: When a person who never confirmed, or who was unsubscribed through member_unsubscribe or after changing their email or phone, asks to receive messages again and you have their member UUID. Check the status and sms_status in the response: they tell what really happened.
When not to use: To add someone who is not in the audience yet, use create_audience_member. To unsubscribe, use member_unsubscribe. Never use it to override a person who unsubscribed themselves: in that case it only sends them a confirmation email. If you have the contact UUID instead of the member UUID, subscribe_contact_to_audience does the same.
Side effects: Email channel. In a double opt-in audience the person always gets a confirmation email and the status changes only when they confirm. In a single opt-in audience the email is confirmed at once, except when the person unsubscribed themselves (suscriber.status.unsuscribed) or the address is on the audience's suppression list: then they get a confirmation email and stay as they were until they confirm. Confirmation emails are not repeated within 15 minutes. SMS channel: in an audience with SMS double opt-in the status becomes suscriber.status.unconfirmed and a confirmation SMS is sent; otherwise it is confirmed at once. When a channel is confirmed at once, the member_subscribed or member_sms_subscribed webhook fires, the automations triggered by a subscription start and, for email, the audience's welcome email is sent if it has one. A channel the person has no email or phone for is ignored. A channel whose consent was recorded by the new Customer App (this includes a channel invalidated by changing the email or phone) is left as it is and the call still answers 200: always read status and sms_status in the response. The disable_double_opt_in and disable_welcome_email flags of member creation do not apply here.
Permissions: Requires the manager role or higher, or the contacts.write and marketing.audiences.write capabilities.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the audience the member belongs to. Get it from list_audiences.
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.
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/actions/subscribe" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "channels": [ "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"}