You will learn

Learn how to send test data to Zapier via a POST request when creating a webhook to send email and SMS consent to Klaviyo.

This article builds off of the information in How to send consent to Klaviyo via Zapier. The test data below matches the SMS example in that guide. To test email consent, adapt the Zap action to subscribe to email marketing. Including an email address in this sample does not subscribe it to email marketing.

Create a POST request

Before testing your trigger, you will need to send test data to your webhook via a POST request. The steps listed below explain how to make the POST request via Postman, but you’re welcome to use any program you’d like.

  1. Copy the webhook URL generated by Zapier.
  2. Create an HTTP request in Postman using its request setup instructions.
Postman’s Create New request menu, showing HTTP Request under the Building Blocks section
Postman’s Create New request menu, showing HTTP Request under the Building Blocks section
  1. Paste the Zapier webhook URL you copied earlier into the URL box.
  2. Select POST from the dropdown to the left of the webhook URL.
Postman setup to create POST request, with POST selected from the dropdown and the Zapier webhook URL entered into URL box
Postman setup to create POST request, with POST selected from the dropdown and the Zapier webhook URL entered into URL box
  1. Select the Body tab, choose the form-data radio button, and then enter the keys and appropriate test data from the following table. For the later Klaviyo SMS subscription test, use a real mobile phone number in E.164 format: a plus sign, country code, and number, with no spaces, hyphens, or parentheses. See accepted phone number formats for details.
Postman form-data body setup for name, email, phone number, and SMS consent
Postman form-data body setup for name, email, phone number, and SMS consent

Key

Value

name

<Test name>

email

<Test email>

phone_number

<Test phone number>

sms_consent

true

  1. Click Send to send the test data to Zapier.
  2. If the POST request is successful, you’ll see the line "status": "success" in the response. This confirms that Zapier received the request; it does not confirm that the profile subscribed in Klaviyo.
Postman POST request response, showing a successful response
Postman POST request response, showing a successful response

Return to Zapier and check that the trigger received the expected test fields. Then continue with How to send consent to Klaviyo via Zapier to map the fields, test the Klaviyo action, and publish your Zap. If you receive an SMS opt-in confirmation during that test, confirm it to finish subscribing.

Additional resources

  • Getting started with Klaviyo APIs

    Get a foundational understanding of API calls and how the Klaviyo APIs can benefit your business. In this guide, you will learn about REST APIs, HTTP methods, and developer tools to prepare you for testing Klaviyo's APIs. Your first API calls can be accomplished in as little as 10 minutes from start to finish. If you are already familiar with API calls and are ready to test our APIs, follow our guide on how to use our Postman collections.

  • Understanding how information is exchanged between Klaviyo and apps

    Learn about how information syncs between Klaviyo and your third-party apps via an application programming interface (API). Most data exchanged via a Klaviyo integration is one-way: data is pulled into your Klaviyo account so you can leverage a broad scope of your customer's data.

  • How to send consent to Klaviyo via Zapier

    Learn how to create a custom Zapier webhook to send SMS consent to Klaviyo. You can easily modify the instructions in this guide to send email consent as well.

Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Partners
Hire a Klaviyo-certified expert to help you with a specific task, or for ongoing marketing management.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type