Skip to main content

Hi, I am selling some products and services and i am taking OptIn confirmation from customers to send them marketing emails and SMS.

 

Now when i create customer on Klaviyo and than use API “https://a.klaviyo.com/client/subscriptions?” they are still not subscribed to email and SMS Marketing. When i run above API,an email is sent to the customer to confirm the subscription.

 

Is there a way to automatically subscribe a customer to a particular list without sending a confirmation email to the customer?

 

Below is request body - 

 

{
  "data": {
    "type": "subscription",
    "attributes": {
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "email": "test@gmail.com",
            "phone_number": "+9797979"
          },
          "subscriptions": {
            "email": {
              "marketing": {
                "consent": "SUBSCRIBED"
              }
            },
            "sms": {
              "marketing": {
                "consent": "SUBSCRIBED"
              },
              "transactional": {
                "consent": "SUBSCRIBED"
              }
            },
            "whatsapp": {
              "marketing": {
                "consent": "SUBSCRIBED"
              },
              "transactional": {
                "consent": "SUBSCRIBED"
              }
            }
          }
        }
      }
    },
    "relationships": {
      "list": {
        "data": {
          "type": "list",
          "id": "Rt4K9n"
        }
      }
    }
  }
}

@jrdgdfg you will need to change the list in question having ID Rt4K9n to single opt in.  More info on how to change it here


I’ve dealt with this exact issue before  the API is working as designed. If you’re using the /client/subscriptions endpoint, Klaviyo will always trigger the double opt-in flow for compliance reasons. That’s why your test profile is getting the confirmation email even though you’re passing "consent": "SUBSCRIBED" in the request.

If you want to add people directly without the confirmation step, you’ll need to either:

  1. Switch the list to single opt-in in your account settings (List → Settings → Consent), then the API will add them as subscribed right away.

  2. Or use the Profiles API (/api/profiles/) to update/create the profile with email/sms consent = subscribed, instead of the subscription endpoint. That bypasses the double opt-in process.

Just keep in mind: if you’re collecting opt-in through your own forms, you need to make sure you can legally back up that consent (GDPR, TCPA, etc.) before skipping the confirmation step.

So in short  Klaviyo isn’t ignoring your payload, it’s just enforcing the opt-in rules on that particular endpoint. Switching to single opt-in or using the profiles API will solve it.