Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Description
Subscribes a user to a group. With this call, the subscription is handled as a self subscription.
Depending on the subscription mode used, the user may have to confirm the subscription (opt-in) and may be notified of the successful subscription.
Available from |
---|
v2 |
Request path
POST [REST URL]/membership/subscribe
Query Parameters
Parameter | Type | Description |
---|---|---|
userId | ID of the user | |
groupId | ID of the group | |
subscriptionMode | CONFIRMED_OPT_IN | New contacts receive a welcome message via email when they are added to the group. 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. OPT_IN is creating self-subscribers. |
Example response
Code Block |
---|
HTTP 204 |
Example response - the group is archived
Code Block |
---|
{ "errorActor": "CLIENT", "errorCode": "NO_SUCH_OBJECT", "message": "Group with id=1109 is archived.", "objectType": "Group", "propertyName": "id", "propertyValue": "1109" } |