Double Opt-In Success Redirect
Send users back to your branded app after they confirm subscription consent.
Double opt-in emails use an ArtaMail link in confirm_url. When the user clicks it, ArtaMail confirms consent, then optionally redirects the browser to a URL configured on the confirm template.
For multiple products, use a separate ArtaMail account per brand with one consent-confirmtemplate and that app's success redirect URL. See Multiple Products. For shared contacts in one account, use multiple templates and confirm_template — see shared contacts (advanced).
preferences_url_template or ArtaMail defaults. See Custom Preference URLs.Setup
- Create or duplicate a transactional template with
{{confirm_url}}(use theconsent-confirmpreset). - Set Success redirect URL on the template in the dashboard editor.
- Optionally configure allowed redirect hosts in Settings → Subscription consent.
- Pass
confirm_templatewhen opting in via API.
const res = await fetch('https://artamail.artatol.net/api/v1/contacts', { method: 'POST', headers: { Authorization: 'Bearer am_live_sk_xxx', 'Content-Type': 'application/json', }, body: JSON.stringify({ email: '[email protected]', opt_in_subtype_slugs: ['weekly-digest'], confirm_template: 'consent-confirm-app1', }),});const { confirm_url } = await res.json();// Send email with same template slug + {{confirm_url}}Redirect query parameters
status=confirmed— successful confirmationstatus=errorwithreason—invalid,already_confirmed
Optional host allowlist
In Settings, you can restrict template redirect URLs to specific hosts. When configured, both template saves and API token generation enforce the allowlist. When empty, any HTTPS URL is accepted on the template.
confirm_template slug for token creation (contact upsert) and when sending the confirm email.