Description
Subscribes a recipient to a group.
The recipient must exist in the system.
Available from |
---|
v2 |
POST [REST URL]/membership/subscribeByEmail
Parameter | Type | Description |
---|---|---|
Email of the user. Attention! According to URL encoding some characters like "+", "[", "]" are need to be encode otherwise the request will fails. For example: name+surname@test.com should be encoded as name%2Bsurname@test.com name[surname@test.com should be encoded as name%5Bsurname@test.com name]surname@test.com should be encoded as name%5Dsurname@test.com | ||
groupId | ID of the group | |
subscriptionMode | SubscriptionMode |
SubscriptionMode | Description |
---|---|
CONFIRMED_OPT_IN | New contacts receive a welcome message via email when they are added to the group. Despite the label used for this value, the contact does not need to confirm the subscription. A single opt-in subscription. |
DOUBLE_OPT_IN | New contacts receive an invitation to join the group via email. The contact must accept the invitation before they are added to the group. A double opt-in subscription. |
OPT_IN | New contacts are added to the group without notification. |
Example response
HTTP 204 |
Example response - group is archived
{ "errorActor": "CLIENT", "errorCode": "NO_SUCH_OBJECT", "message": "Group with id=1109 is archived.", "objectType": "Group", "propertyName": "id", "propertyValue": "1109" } |