> ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Subscribe a user to a group > 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. ## OpenAPI ````json POST /membership/subscribe { "openapi": "3.0.4", "info": { "title": "Engage public API", "version": "1" }, "servers": [ { "url": "https://your-engage-domain.com/api/rest" } ], "tags": [ { "name": "Address Attributes" }, { "name": "Async" }, { "name": "Audit Log" }, { "name": "Automation" }, { "name": "Blacklist" }, { "name": "CMS (legacy)" }, { "name": "CMS Blocks" }, { "name": "CMS Frameworks" }, { "name": "CMS Messages" }, { "name": "CMS Templates" }, { "name": "Contact" }, { "name": "Content" }, { "name": "Coupon" }, { "name": "Draft Message" }, { "name": "Ecommerce" }, { "name": "Group" }, { "name": "Group Attributes" }, { "name": "Landing Page" }, { "name": "Member Attributes" }, { "name": "Membership" }, { "name": "Message" }, { "name": "Meta" }, { "name": "Mobile Push" }, { "name": "Prepared Message" }, { "name": "Process" }, { "name": "Profile Attributes" }, { "name": "Related Data" }, { "name": "Segmentation" }, { "name": "System" }, { "name": "System User" }, { "name": "Usage Statistics" }, { "name": "User" }, { "name": "Whiteboard" } ], "paths": { "/membership/subscribe": { "post": { "tags": [ "Membership" ], "summary": "Subscribe a user to a group", "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.", "operationId": "subscribe", "parameters": [ { "name": "userId", "in": "query", "description": "ID of the user", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "groupId", "in": "query", "description": "ID of the group", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "subscriptionMode", "in": "query", "description": "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", "required": true, "schema": { "enum": [ "CONFIRMED_OPT_IN", "DOUBLE_OPT_IN", "OPT_IN" ], "type": "string" } } ], "responses": { "204": { "description": "", "content": { "application/json": {} } }, "400": { "description": "Parameter 'userId' is mandatory but no value was specified. / User with id does not exist.", "content": { "application/json": {} } }, "404": { "description": "Not found", "content": { "application/json": {} } } } } } } } ````