Webflow sync, pageviews & more.
NEW

How can I fix the "Bad Request" and "ValidationError" error I am getting when trying to send a POST request from Zapier to Webflow using API integration?

TL;DR
  • Verify the Webflow API endpoint, required fields, and use correct API field keys—not labels—by referencing Webflow's API docs or fetching the collection schema.
  • Ensure the JSON payload is wrapped under a "fields" key, includes all required values with correct data types, and that headers like Authorization and Content-Type are properly set.

You're getting a "Bad Request" or "ValidationError" because the payload format or request headers sent from Zapier to Webflow's API doesn't exactly match what Webflow expects.

1. Check Webflow API Documentation

  • Review the endpoint you're sending the POST request to, such as /collections/{collection_id}/items or /sites/{site_id}/publish.
  • Compare your Zapier data against the required fields and format found in Webflow's official API reference.

2. Match Collection Field Keys

  • Inside Webflow, go to CMS Collections > Settings, and click Export as JSON if available.
  • Alternatively, use a GET request to /collections/{collection_id} to retrieve the correct field keys (e.g., name, slug, customfieldID).
  • Do not use label names like “Blog Name” — you must use the field API keys.

3. Validate Required Fields

  • Certain fields are mandatory, such as name and slug.
  • If a field is of type Image, Reference, or Boolean, the values must conform:
  • References need valid IDs from connected collections.
  • Images require a valid HTTPS URL.
  • Booleans should be either true or false.

4. Format Your Payload Correctly

  • Your Zapier JSON needs to be structured exactly like this:
  • Example payload:
    • fields: { "name": "Test", "slug": "test-slug", "customfield": "value" }
    • Must be wrapped in a parent JSON object with a fields key.
  • If using Code by Zapier, ensure:
  • You’re sending JSON with correct Content-Type: application/json.
  • The body is stringified (e.g., using JSON.stringify()).

5. Set Correct Headers

  • Include these headers in your Webhook POST action:
  • Authorization: Bearer YOUR_API_TOKEN
  • Content-Type: application/json
  • Optional: accept-version: 1.0.0 (if required by your API versioning).

6. Enable Live Mode If Needed

  • If you're sending to a “live” collection, you may need to set "live": true in the request payload.
  • Example: {"fields": {...}, "live": true}

7. Check Full Error Message

  • Zapier’s error log will usually include the ValidationError message details.
  • Look for messages like:
  • “Field is required but missing”
  • “Invalid slug”
  • “Unknown field: blog_title” — which indicates you're using the label, not the API key

Summary

To fix the Webflow "Bad Request" or "ValidationError" via Zapier POST request, ensure you're using correct CMS field keys, providing all required values, formatting the payload exactly as Webflow expects, and including proper headers and authentication. Always cross-check with the Webflow API docs and review the full error message for clues.

Rate this answer

Other Webflow Questions