TanqoryDocs

tanqoryExtNewsletterSubscribe

  • Mutation
  • Storefront

The newsletter sign-up form ({% form 'customer' %}, card WEB-6): subscribes email to email marketing. A new email becomes a customer without an account (state DISABLED, no email sent); an existing customer's consent is set to subscribed (pending when the store asks for double opt-in) and tags are added. The answer is the same either way, so the form does not tell whether the email already belongs to a customer.

Arguments

ArgumentTypeRequiredDefault
emailString!Required
firstNameStringOptional
lastNameStringOptional
tags[String!]Optional

Returns

TanqoryExtNewsletterSubscribePayload!

FieldTypeDescription
userErrors[TanqoryExtFormUserError!]!

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_STOREFRONT_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://$STORE_HOST/api/v1/stores/$STORE_ID/2026-10/graphql" \
  -H "X-Tanqory-Storefront-Access-Token: $TANQORY_STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"mutation TanqoryExtNewsletterSubscribe($email: String!) {\n  tanqoryExtNewsletterSubscribe(email: $email) {\n    userErrors {\n      field\n      message\n      code\n    }\n  }\n}","variables":{"email":""}}'

Built from commit c0b3fb3fdef7 · API version 2026-10