Skip to main content
Solved

Error status code 400 on flow webhook

  • December 20, 2023
  • 2 replies
  • 331 views

Forum|alt.badge.img+3
  • Contributor III
  • 6 replies

I’m trying to create an auto-suppression flow with a webhook using the steps in https://medium.com/klaviyo-developers/solution-recipe-9-use-klaviyo-flow-webhooks-to-automate-suppressions-using-segments-and-a-custom-d431c247e96d.

As far as I can tell, I set up everything correctly, but when I try a test, I get “Error: status code 400 received when sending webhook.” Any ideas?

Headers:

Authorization: Klaviyo-API-Key [my private key]

accept: application/json

content-type: application/json

revision: 2023-12-20

JSON body:

{
  "data": {
    "type": "profile-suppression-bulk-create-job",
    "attributes": {
      "suppressions": [
        {
          "email": "{{person.email}}"
        }
      ]
    }
  }
}

 

 

 

 

Best answer by DavidSandel

The Revision date is the date of the API, not the actual date you’re implementing webhooks. So, it would be: 2023-12-15

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

DavidSandel
Partner - Silver
Forum|alt.badge.img+21
  • Partner - Silver
  • 155 replies
  • Answer
  • December 20, 2023

The Revision date is the date of the API, not the actual date you’re implementing webhooks. So, it would be: 2023-12-15


Forum|alt.badge.img+3
  • Author
  • Contributor III
  • 6 replies
  • December 20, 2023

Thanks David. Looks like I had to use 2023-02-22 for this, but making that change did the trick.