Ostorya dev docs

Admin API/Customers/Mutations

customerSmsMarketingConsentUpdate

mutation

Returns CustomerSmsMarketingConsentUpdatePayload!

mutation CustomerSmsMarketingConsentUpdate($input: CustomerSmsMarketingConsentUpdateInput!) {
  customerSmsMarketingConsentUpdate(input: $input) {
    customer {
      id
      email
      phone
      createdAt
      blocked
      blockedReason
    }
    userErrors {
      code
      message
      field
    }
  }
}

# Variables
{
  "input": {
    "customerId": "gid://ostorya/Customer/0f8c5b1e-…",
    "marketingConsent": {
      "marketingState": "NOT_SUBSCRIBED"
    }
  }
}

Arguments

Payload

customerCustomer
userErrors[UserError!]!required