afaab604b58c
Trigger a double opt-in subscription flow
This endpoint triggers a double opt-in subscription for a user. <br/><br/>Once the user responds to the subscription confirmation message, they will be subscribed to the message types specified in the request body. <br/><br/>This endpoint can only be used with SMS, double opt-in message types. To enable it, contact your customer success manager.<br/><br/>Learn about <a href="https://support.iterable.com/hc/articles/29156459027348">identifying users by <code>userId</code> and <code>email</code></a>.<br/><br/><b>Response Format Notes:</b><ul><li>202 Accepted: Plain text (e.g., 'Request for double opt-in subscription accepted')</li><li>204 No Content: Returned when user is already subscribed to all requested message types (no body)</li><li>400 Bad Request (JSON parsing error): JSON <code>{error, message, code, data}</code></li><li>400 Bad Request (validation error): Plain text (e.g., 'User not found for userId: X or email: Y')</li><li>404 Not Found: JSON <code>{msg, code, params}</code> (returned when feature is not enabled)</li><li>500 Internal Server Error: Plain text</li></ul>
Request body
Response
Request accepted (plain text: 'Request for double opt-in subscription accepted')