Solved

Error status code 400 on flow webhook

  • 20 December 2023
  • 2 replies
  • 112 views

Badge +3

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}}"
        }
      ]
    }
  }
}

 

 

 

 

icon

Best answer by DavidSandel 20 December 2023, 22:08

View original

2 replies

Userlevel 5
Badge +19

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

Badge +3

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

Reply